<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Generic (owl.Owl_dense_matrix.Generic)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">owl</a> &#x00BB; <a href="../index.html">Owl_dense_matrix</a> &#x00BB; Generic</nav><h1>Module <code>Owl_dense_matrix.Generic</code></h1></header><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../../Owl_dense_matrix_generic/index.html">Owl_dense_matrix_generic</a></code></span></summary><aside><p>About the comparison of two complex numbers ``x`` and ``y``, Owl uses the following conventions: 1) ``x`` and ``y`` are equal iff both real and imaginary parts are equal; 2) ``x`` is less than ``y`` if the magnitude of ``x`` is less than the magnitude of ``x``; in case both ``x`` and ``y`` have the same magnitudes, ``x`` is less than ``x`` if the phase of ``x`` is less than the phase of ``y``; 3) less or equal, greater, greater or equal relation can be further defined atop of the aforementioned conventions.</p></aside><section><header><h6 id="type-definition"><a href="#type-definition" class="anchor"></a>Type definition</h6></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>('a, 'b) t</span></code><code> = <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>, Stdlib.Bigarray.c_layout)</span> Stdlib.Bigarray.Genarray.t</span></code></dt><dd><p>N-dimensional array type, i.e. Bigarray Genarray type.</p></dd></dl></section><section><header><h6 id="create-matrices"><a href="#create-matrices" class="anchor"></a>Create matrices</h6></header><dl><dt class="spec value" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span class="keyword">val</span> empty : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``empty m n`` creates an ``m`` by ``n`` matrix without initialising the values of elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``create m n a`` creates an ``m`` by ``n`` matrix and all the elements of ``x`` are initialised with the value ``a``.</p></dd></dl><dl><dt class="spec value" id="val-init"><a href="#val-init" class="anchor"></a><code><span class="keyword">val</span> init : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``init m n f`` creates a matrix ``x`` of shape ``m x n``, then using ``f`` to initialise the elements in ``x``. The input of ``f`` is 1-dimensional index of the matrix. You need to explicitly convert it if you need 2D index. The function ``Owl_utils.ind`` can help you.</p></dd></dl><dl><dt class="spec value" id="val-init_2d"><a href="#val-init_2d" class="anchor"></a><code><span class="keyword">val</span> init_2d : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``init_2d m n f`` s almost the same as ``init`` but ``f`` receives 2D index as input. It is more convenient since you don't have to convert the index by yourself, but this also means ``init_2d`` is slower than ``init``.</p></dd></dl><dl><dt class="spec value" id="val-zeros"><a href="#val-zeros" class="anchor"></a><code><span class="keyword">val</span> zeros : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``zeros m n`` creates an ``m`` by ``n`` matrix where all the elements are initialised to zeros.</p></dd></dl><dl><dt class="spec value" id="val-ones"><a href="#val-ones" class="anchor"></a><code><span class="keyword">val</span> ones : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``ones m n`` creates an ``m`` by ``n`` matrix where all the elements are ones.</p></dd></dl><dl><dt class="spec value" id="val-eye"><a href="#val-eye" class="anchor"></a><code><span class="keyword">val</span> eye : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``eye m`` creates an ``m`` by ``m`` identity matrix.</p></dd></dl><dl><dt class="spec value" id="val-complex"><a href="#val-complex" class="anchor"></a><code><span class="keyword">val</span> complex : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``complex re im`` constructs a complex ndarray/matrix from ``re`` and ``im``. ``re`` and ``im`` contain the real and imaginary part of ``x`` respectively.</p><p>Note that both ``re`` and ``im`` can be complex but must have same type. The real part of ``re`` will be the real part of ``x`` and the imaginary part of ``im`` will be the imaginary part of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-polar"><a href="#val-polar" class="anchor"></a><code><span class="keyword">val</span> polar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``complex rho theta`` constructs a complex ndarray/matrix from polar coordinates ``rho`` and ``theta``. ``rho`` contains the magnitudes and ``theta`` contains phase angles. Note that the behaviour is undefined if ``rho`` has negative elelments or ``theta`` has infinity elelments.</p></dd></dl><dl><dt class="spec value" id="val-unit_basis"><a href="#val-unit_basis" class="anchor"></a><code><span class="keyword">val</span> unit_basis : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``unit_basis k n i`` returns a unit basis vector with ``i``th element set to 1.</p></dd></dl><dl><dt class="spec value" id="val-sequential"><a href="#val-sequential" class="anchor"></a><code><span class="keyword">val</span> sequential : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;step:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sequential ~a ~step m n`` creates an ``m`` by ``n`` matrix. The elements in ``x`` are initialised sequentiallly from ``~a`` and is increased by ``~step``.</p><p>The default value of ``~a`` is zero whilst the default value of ``~step`` is one.</p></dd></dl><dl><dt class="spec value" id="val-uniform"><a href="#val-uniform" class="anchor"></a><code><span class="keyword">val</span> uniform : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;b:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``uniform m n`` creates an ``m`` by ``n`` matrix where all the elements follow a uniform distribution in ``(0,1)`` interval. ``uniform ~scale:a m n`` adjusts the interval to ``(0,a)``.</p></dd></dl><dl><dt class="spec value" id="val-gaussian"><a href="#val-gaussian" class="anchor"></a><code><span class="keyword">val</span> gaussian : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;mu:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;sigma:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``gaussian m n`` creates an ``m`` by ``n`` matrix where all the elements in ``x`` follow a Gaussian distribution with specified sigma. By default ``sigma = 1``.</p></dd></dl><dl><dt class="spec value" id="val-semidef"><a href="#val-semidef" class="anchor"></a><code><span class="keyword">val</span> semidef : <span><span>(float, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>`` semidef n `` returns an random ``n`` by ``n`` positive semi-definite matrix.</p></dd></dl><dl><dt class="spec value" id="val-linspace"><a href="#val-linspace" class="anchor"></a><code><span class="keyword">val</span> linspace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``linspace a b n`` linearly divides the interval ``<code>a,b</code>`` into ``n`` pieces by creating an ``m`` by ``1`` row vector. E.g., ``linspace 0. 5. 5`` will create a row vector ``<code>0;1;2;3;4;5</code>``.</p></dd></dl><dl><dt class="spec value" id="val-logspace"><a href="#val-logspace" class="anchor"></a><code><span class="keyword">val</span> logspace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;base:float</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``logspace base a b n`` ... the default value of base is ``e``.</p></dd></dl><dl><dt class="spec value" id="val-meshgrid"><a href="#val-meshgrid" class="anchor"></a><code><span class="keyword">val</span> meshgrid : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``meshgrid a1 b1 a2 b2 n1 n2`` is similar to the ``meshgrid`` function in Matlab. It returns two matrices ``x`` and ``y`` where the row vectors in ``x`` are linearly spaced between ``<code>a1,b1</code>`` by ``n1`` whilst the column vectors in ``y`` are linearly spaced between ``(a2,b2)`` by ``n2``.</p></dd></dl><dl><dt class="spec value" id="val-meshup"><a href="#val-meshup" class="anchor"></a><code><span class="keyword">val</span> meshup : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``meshup x y`` creates mesh grids by using two row vectors ``x`` and ``y``.</p></dd></dl><dl><dt class="spec value" id="val-bernoulli"><a href="#val-bernoulli" class="anchor"></a><code><span class="keyword">val</span> bernoulli : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span>?&#8288;p:float</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``bernoulli k ~p:0.3 m n``</p></dd></dl><dl><dt class="spec value" id="val-diagm"><a href="#val-diagm" class="anchor"></a><code><span class="keyword">val</span> diagm : <span>?&#8288;k:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``diagm k v`` creates a diagonal matrix using the elements in ``v`` as diagonal values. ``k`` specifies the main diagonal index. If ``k &gt; 0`` then it is above the main diagonal, if ``k &lt; 0`` then it is below the main diagonal. This function is the same as the ``diag`` function in Matlab.</p></dd></dl><dl><dt class="spec value" id="val-triu"><a href="#val-triu" class="anchor"></a><code><span class="keyword">val</span> triu : <span>?&#8288;k:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``triu k x`` returns the element on and above the ``k``th diagonal of ``x``. ``k = 0`` is the main diagonal, ``k &gt; 0`` is above the main diagonal, and ``k &lt; 0`` is below the main diagonal.</p></dd></dl><dl><dt class="spec value" id="val-tril"><a href="#val-tril" class="anchor"></a><code><span class="keyword">val</span> tril : <span>?&#8288;k:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tril k x`` returns the element on and below the ``k``th diagonal of ``x``. ``k = 0`` is the main diagonal, ``k &gt; 0`` is above the main diagonal, and ``k &lt; 0`` is below the main diagonal.</p></dd></dl><dl><dt class="spec value" id="val-symmetric"><a href="#val-symmetric" class="anchor"></a><code><span class="keyword">val</span> symmetric : <span>?&#8288;upper:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``symmetric ~upper x`` creates a symmetric matrix using either upper or lower triangular part of ``x``. If ``upper`` is ``true`` then it uses the upper part, if ``upper`` is ``false``, then ``symmetric`` uses the lower part. By default ``upper`` is true.</p></dd></dl><dl><dt class="spec value" id="val-hermitian"><a href="#val-hermitian" class="anchor"></a><code><span class="keyword">val</span> hermitian : <span>?&#8288;upper:bool</span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``hermitian ~upper x`` creates a hermitian matrix based on ``x``. By default, the upper triangular part is used for creating the hermitian matrix, but you use the lower part by setting ``upper=false``</p></dd></dl><dl><dt class="spec value" id="val-bidiagonal"><a href="#val-bidiagonal" class="anchor"></a><code><span class="keyword">val</span> bidiagonal : <span>?&#8288;upper:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``bidiagonal upper dv ev`` creates a bidiagonal matrix using ``dv`` and ``ev``. Both ``dv`` and ``ev`` are row vectors. ``dv`` is the main diagonal. If ``upper`` is ``true`` then ``ev`` is superdiagonal; if ``upper`` is ``false`` then ``ev`` is subdiagonal. By default, ``upper`` is ``true``.</p><p>NOTE: because the diagonal elements in a hermitian matrix must be real, the function set the imaginary part of the diagonal elements to zero by default. In other words, if the diagonal elements of ``x`` have non-zero imaginary parts, the imaginary parts will be dropped without a warning.</p></dd></dl><dl><dt class="spec value" id="val-toeplitz"><a href="#val-toeplitz" class="anchor"></a><code><span class="keyword">val</span> toeplitz : <span>?&#8288;c:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``toeplitz ~c r`` generates a toeplitz matrix using ``r`` and ``c``. Both ``r`` and ``c`` are row vectors of the same length. If the first elements of ``c`` is different from that of ``r``, ``r``'s first element will be used.</p><p>Note: 1) If ``c`` is not passed in, then ``c = r`` will be used. 2) If ``c`` is not passed in and ``r`` is complex, the ``c = conj r`` will be used. 3) If ``r`` and ``c`` have different length, then the result is a rectangular matrix.</p></dd></dl><dl><dt class="spec value" id="val-hankel"><a href="#val-hankel" class="anchor"></a><code><span class="keyword">val</span> hankel : <span>?&#8288;r:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``hankel ~r c`` generates a hankel matrix using ``r`` and ``c``. ``c`` will be the first column and ``r`` will be the last row of the returned matrix.</p><p>Note: 1) If only ``c`` is passed in, the elelments below the anti-diagnoal are zero. 2) If the last element of ``c`` is different from the first element of ``r`` then the first element of ``c`` prevails. 3) ``c`` and ``r`` can have different length, the return will be an rectangular matrix.</p></dd></dl><dl><dt class="spec value" id="val-hadamard"><a href="#val-hadamard" class="anchor"></a><code><span class="keyword">val</span> hadamard : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``hadamard k n`` constructs a hadamard matrix of order ``n``. For a hadamard ``H``, we have ``H'*H = n*I``. Currrently, this function handles only the cases where ``n``, ``n/12``, or ``n/20`` is a power of 2.</p></dd></dl><dl><dt class="spec value" id="val-magic"><a href="#val-magic" class="anchor"></a><code><span class="keyword">val</span> magic : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``magic k n`` constructs a ``n x n`` magic square matrix ``x``. The elements in ``x`` are consecutive numbers increasing from ``1`` to ``n^2``. ``n`` must ``n &gt;= 3``.</p><p>There are three different algorithms to deal with ``n`` is odd, singly even, and doubly even respectively.</p></dd></dl></section><section><header><h6 id="obtain-basic-properties"><a href="#obtain-basic-properties" class="anchor"></a>Obtain basic properties</h6></header><dl><dt class="spec value" id="val-shape"><a href="#val-shape" class="anchor"></a><code><span class="keyword">val</span> shape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int * int</code></dt><dd><p>If ``x`` is an ``m`` by ``n`` matrix, ``shape x`` returns ``(m,n)``, i.e., the size of two dimensions of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-row_num"><a href="#val-row_num" class="anchor"></a><code><span class="keyword">val</span> row_num : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``row_num x`` returns the number of rows in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-col_num"><a href="#val-col_num" class="anchor"></a><code><span class="keyword">val</span> col_num : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``col_num x`` returns the number of columns in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-numel"><a href="#val-numel" class="anchor"></a><code><span class="keyword">val</span> numel : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``numel x`` returns the number of elements in matrix ``x``. It is equivalent to ``(row_num x) * (col_num x)``.</p></dd></dl><dl><dt class="spec value" id="val-nnz"><a href="#val-nnz" class="anchor"></a><code><span class="keyword">val</span> nnz : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``nnz x`` returns the number of non-zero elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-density"><a href="#val-density" class="anchor"></a><code><span class="keyword">val</span> density : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``density x`` returns the percentage of non-zero elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-size_in_bytes"><a href="#val-size_in_bytes" class="anchor"></a><code><span class="keyword">val</span> size_in_bytes : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int</code></dt><dd><p>``size_in_bytes x`` returns the size of ``x`` in bytes in memory.</p></dd></dl><dl><dt class="spec value" id="val-same_shape"><a href="#val-same_shape" class="anchor"></a><code><span class="keyword">val</span> same_shape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``same_shape x y`` returns ``true`` if two matrics have the same shape.</p></dd></dl><dl><dt class="spec value" id="val-same_data"><a href="#val-same_data" class="anchor"></a><code><span class="keyword">val</span> same_data : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>Refer to :doc:`owl_dense_ndarray_generic`.</p></dd></dl><dl><dt class="spec value" id="val-kind"><a href="#val-kind" class="anchor"></a><code><span class="keyword">val</span> kind : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span></code></dt><dd><p>``kind x`` returns the type of matrix ``x``.</p></dd></dl></section><section><header><h6 id="manipulate-a-matrix"><a href="#manipulate-a-matrix" class="anchor"></a>Manipulate a matrix</h6></header><dl><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``get x i j`` returns the value of element ``(i,j)`` of ``x``. The shorthand for ``get x i j`` is ``x.<i>,j</i>``</p></dd></dl><dl><dt class="spec value" id="val-set"><a href="#val-set" class="anchor"></a><code><span class="keyword">val</span> set : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set x i j a`` sets the element ``(i,j)`` of ``x`` to value ``a``. The shorthand for ``set x i j a`` is ``x.<i>,j</i> &lt;- a``</p></dd></dl><dl><dt class="spec value" id="val-get_index"><a href="#val-get_index" class="anchor"></a><code><span class="keyword">val</span> get_index : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>int array</span> array</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span></code></dt><dd><p>``get_index i x`` returns an array of element values specified by the indices ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.</p><p>E.g., ``<code>| [|1;2|]; [|3;4|] |</code>`` returns the value of elements at position ``(1,3)`` and ``(2,4)`` respectively.</p></dd></dl><dl><dt class="spec value" id="val-set_index"><a href="#val-set_index" class="anchor"></a><code><span class="keyword">val</span> set_index : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>int array</span> array</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_index`` sets the value of elements in ``x`` according to the indices specified by ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.</p></dd></dl><dl><dt class="spec value" id="val-get_fancy"><a href="#val-get_fancy" class="anchor"></a><code><span class="keyword">val</span> get_fancy : <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``get_fancy s x`` returns a copy of the slice in ``x``. The slice is defined by ``a`` which is an ``int array``. Please refer to the same function in the ``Owl_dense_ndarray_generic`` documentation for more details.</p></dd></dl><dl><dt class="spec value" id="val-set_fancy"><a href="#val-set_fancy" class="anchor"></a><code><span class="keyword">val</span> set_fancy : <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_fancy axis x y`` set the slice defined by ``axis`` in ``x`` according to the values in ``y``. ``y`` must have the same shape as the one defined by ``axis``.</p><p>About the slice definition of ``axis``, please refer to ``slice`` function.</p></dd></dl><dl><dt class="spec value" id="val-get_slice"><a href="#val-get_slice" class="anchor"></a><code><span class="keyword">val</span> get_slice : <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``get_slice axis x`` aims to provide a simpler version of ``get_fancy``. This function assumes that every list element in the passed in ``in list list`` represents a range, i.e., ``R`` constructor.</p><p>E.g., ``<code>[];[0;3];[0]</code>`` is equivalent to ``<code>R []; R [0;3]; R [0]</code>``.</p></dd></dl><dl><dt class="spec value" id="val-set_slice"><a href="#val-set_slice" class="anchor"></a><code><span class="keyword">val</span> set_slice : <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``set_slice axis x y`` aims to provide a simpler version of ``set_slice``. This function assumes that every list element in the passed in ``in list list`` represents a range, i.e., ``R`` constructor.</p><p>E.g., ``<code>[];[0;3];[0]</code>`` is equivalent to ``<code>R []; R [0;3]; R [0]</code>``.</p></dd></dl><dl><dt class="spec value" id="val-row"><a href="#val-row" class="anchor"></a><code><span class="keyword">val</span> row : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``row x i`` returns row ``i`` of ``x``. Note: Unlike ``col``, the return value is simply a view onto the original row in ``x``, so modifying ``row``'s value also alters ``x``.</p><p>The function supports nagative indices.</p></dd></dl><dl><dt class="spec value" id="val-col"><a href="#val-col" class="anchor"></a><code><span class="keyword">val</span> col : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``col x j`` returns column ``j`` of ``x``. Note: Unlike ``row``, the return value is a copy of the original row in ``x``.</p><p>The function supports nagative indices.</p></dd></dl><dl><dt class="spec value" id="val-rows"><a href="#val-rows" class="anchor"></a><code><span class="keyword">val</span> rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``rows x a`` returns the rows (defined in an int array ``a``) of ``x``. The returned rows will be combined into a new dense matrix. The order of rows in the new matrix is the same as that in the array ``a``.</p><p>The function supports nagative indices.</p></dd></dl><dl><dt class="spec value" id="val-cols"><a href="#val-cols" class="anchor"></a><code><span class="keyword">val</span> cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``rows``, ``cols x a`` returns the columns (specified in array ``a``) of x in a new dense matrix.</p><p>The function supports nagative indices.</p></dd></dl><dl><dt class="spec value" id="val-resize"><a href="#val-resize" class="anchor"></a><code><span class="keyword">val</span> resize : <span>?&#8288;head:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``resize x s`` please refer to the Ndarray document.</p></dd></dl><dl><dt class="spec value" id="val-reshape"><a href="#val-reshape" class="anchor"></a><code><span class="keyword">val</span> reshape : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reshape x s`` returns a new ``m`` by ``n`` matrix from the ``m'`` by ``n'`` matrix ``x``. Note that ``(m * n)`` must be equal to ``(m' * n')``, and the returned matrix shares the same memory with the original ``x``.</p></dd></dl><dl><dt class="spec value" id="val-flatten"><a href="#val-flatten" class="anchor"></a><code><span class="keyword">val</span> flatten : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``flatten x`` reshape ``x`` into a ``1`` by ``n`` row vector without making a copy. Therefore the returned value shares the same memory space with original ``x``.</p></dd></dl><dl><dt class="spec value" id="val-reverse"><a href="#val-reverse" class="anchor"></a><code><span class="keyword">val</span> reverse : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reverse x`` reverse the order of all elements in the flattened ``x`` and returns the results in a new matrix. The original ``x`` remains intact.</p></dd></dl><dl><dt class="spec value" id="val-flip"><a href="#val-flip" class="anchor"></a><code><span class="keyword">val</span> flip : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``flip ~axis x`` flips a matrix/ndarray along ``axis``. By default ``axis = 0``. The result is returned in a new matrix/ndarray, so the original ``x`` remains intact.</p></dd></dl><dl><dt class="spec value" id="val-rotate"><a href="#val-rotate" class="anchor"></a><code><span class="keyword">val</span> rotate : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``rotate x d`` rotates ``x`` clockwise ``d`` degrees. ``d`` must be multiple times of ``90``, otherwise the function will fail. If ``x`` is an n-dimensional array, then the function rotates the plane formed by the first and second dimensions.</p></dd></dl><dl><dt class="spec value" id="val-reset"><a href="#val-reset" class="anchor"></a><code><span class="keyword">val</span> reset : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``reset x`` resets all the elements of ``x`` to zero value.</p></dd></dl><dl><dt class="spec value" id="val-fill"><a href="#val-fill" class="anchor"></a><code><span class="keyword">val</span> fill : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fill x a`` fills the ``x`` with value ``a``.</p></dd></dl><dl><dt class="spec value" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span class="keyword">val</span> copy : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``copy x`` returns a copy of matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-copy_row_to"><a href="#val-copy_row_to" class="anchor"></a><code><span class="keyword">val</span> copy_row_to : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>``copy_row_to v x i`` copies an ``1`` by ``n`` row vector ``v`` to the ``ith`` row in an ``m`` by ``n`` matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-copy_col_to"><a href="#val-copy_col_to" class="anchor"></a><code><span class="keyword">val</span> copy_col_to : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>``copy_col_to v x j`` copies an ``1`` by ``n`` column vector ``v`` to the ``jth`` column in an ``m`` by ``n`` matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-concat_vertical"><a href="#val-concat_vertical" class="anchor"></a><code><span class="keyword">val</span> concat_vertical : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_vertical x y`` concats two matrices ``x`` and ``y`` vertically, therefore their column numbers must be the same.</p><p>The associated operator is ``@=``, please refer to :doc:`owl_operator`.</p></dd></dl><dl><dt class="spec value" id="val-concat_horizontal"><a href="#val-concat_horizontal" class="anchor"></a><code><span class="keyword">val</span> concat_horizontal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_horizontal x y`` concats two matrices ``x`` and ``y`` horizontally, therefore their row numbers must be the same.</p><p>The associated operator is ``@||``, please refer to :doc:`owl_operator`.</p></dd></dl><dl><dt class="spec value" id="val-concat_vh"><a href="#val-concat_vh" class="anchor"></a><code><span class="keyword">val</span> concat_vh : <span><span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concat_vh`` is used to assemble small parts of matrices into a bigger one. E.g. ``<code>| [|a; b; c|]; [|d; e; f|]; [|g; h; i|] |</code>`` will be concatenated into a big matrix as follows.</p><p>Please refer to :doc:`owl_dense_ndarray_generic`. for details.</p></dd></dl><dl><dt class="spec value" id="val-concatenate"><a href="#val-concatenate" class="anchor"></a><code><span class="keyword">val</span> concatenate : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``concatenate ~axis:1 x`` concatenates an array of matrices along the second dimension. For the matrices in ``x``, they must have the same shape except the dimension specified by ``axis``. The default value of ``axis`` is 0, i.e., the lowest dimension on a marix, i.e., rows.</p></dd></dl><dl><dt class="spec value" id="val-split"><a href="#val-split" class="anchor"></a><code><span class="keyword">val</span> split : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dd><p>``split ~axis parts x`` splits an ndarray ``x`` into parts along the specified ``axis``. This function is the inverse operation of ``concatenate``. The elements in ``x`` must sum up to the dimension in the specified axis.</p></dd></dl><dl><dt class="spec value" id="val-split_vh"><a href="#val-split_vh" class="anchor"></a><code><span class="keyword">val</span> split_vh : <span><span><span>(int * int)</span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> array</span></code></dt><dd><p>Please refer to :doc:`owl_dense_ndarray_generic`. for details.</p></dd></dl><dl><dt class="spec value" id="val-transpose"><a href="#val-transpose" class="anchor"></a><code><span class="keyword">val</span> transpose : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``transpose x`` transposes an ``m`` by ``n`` matrix to ``n`` by ``m`` one.</p></dd></dl><dl><dt class="spec value" id="val-ctranspose"><a href="#val-ctranspose" class="anchor"></a><code><span class="keyword">val</span> ctranspose : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``ctranspose x`` performs conjugate transpose of a complex matrix ``x``. If ``x`` is a real matrix, then ``ctranspose x`` is equivalent to ``transpose x``.</p></dd></dl><dl><dt class="spec value" id="val-diag"><a href="#val-diag" class="anchor"></a><code><span class="keyword">val</span> diag : <span>?&#8288;k:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``diag k x`` returns the ``k``th diagonal elements of ``x``. ``k &gt; 0`` means above the main diagonal and ``k &lt; 0`` means the below the main diagonal.</p></dd></dl><dl><dt class="spec value" id="val-swap_rows"><a href="#val-swap_rows" class="anchor"></a><code><span class="keyword">val</span> swap_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>``swap_rows x i i'`` swaps the row ``i`` with row ``i'`` of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-swap_cols"><a href="#val-swap_cols" class="anchor"></a><code><span class="keyword">val</span> swap_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dd><p>``swap_cols x j j'`` swaps the column ``j`` with column ``j'`` of ``x``.</p></dd></dl><dl><dt class="spec value" id="val-tile"><a href="#val-tile" class="anchor"></a><code><span class="keyword">val</span> tile : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tile x a`` provides the exact behaviour as ``numpy.tile`` function.</p></dd></dl><dl><dt class="spec value" id="val-repeat"><a href="#val-repeat" class="anchor"></a><code><span class="keyword">val</span> repeat : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``repeat x a`` repeats the elements ``x`` according the repetition specified by ``a``.</p></dd></dl><dl><dt class="spec value" id="val-pad"><a href="#val-pad" class="anchor"></a><code><span class="keyword">val</span> pad : <span>?&#8288;v:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``padd ~v:0. <code>[1;1]</code> x``</p></dd></dl><dl><dt class="spec value" id="val-dropout"><a href="#val-dropout" class="anchor"></a><code><span class="keyword">val</span> dropout : <span>?&#8288;rate:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``dropout ~rate:0.3 x`` drops out 30% of the elements in ``x``, in other words, by setting their values to zeros.</p></dd></dl><dl><dt class="spec value" id="val-top"><a href="#val-top" class="anchor"></a><code><span class="keyword">val</span> top : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>int array</span> array</span></code></dt><dd><p>``top x n`` returns the indices of ``n`` greatest values of ``x``. The indices are arranged according to the corresponding element values, from the greatest one to the smallest one.</p></dd></dl><dl><dt class="spec value" id="val-bottom"><a href="#val-bottom" class="anchor"></a><code><span class="keyword">val</span> bottom : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>int array</span> array</span></code></dt><dd><p>``bottom x n`` returns the indices of ``n`` smallest values of ``x``. The indices are arranged according to the corresponding element values, from the smallest one to the greatest one.</p></dd></dl><dl><dt class="spec value" id="val-sort"><a href="#val-sort" class="anchor"></a><code><span class="keyword">val</span> sort : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sort x`` performs quicksort of the elelments in ``x``. A new copy is returned as result, the original ``x`` remains intact. If you want to perform in-place sorting, please use `sort_` instead.</p></dd></dl><dl><dt class="spec value" id="val-argsort"><a href="#val-argsort" class="anchor"></a><code><span class="keyword">val</span> argsort : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(int64, Stdlib.Bigarray.int64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``argsort x`` returns the indices with which the elements in ``x`` are sorted in increasing order. Note that the returned index ndarray has the same shape as that of ``x``, and the indices are 1D indices.</p></dd></dl></section><section><header><h6 id="iteration-functions"><a href="#iteration-functions" class="anchor"></a>Iteration functions</h6></header><dl><dt class="spec value" id="val-iteri"><a href="#val-iteri" class="anchor"></a><code><span class="keyword">val</span> iteri : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iteri f x`` iterates all the elements in ``x`` and applies the user defined function ``f : int -&gt; int -&gt; float -&gt; 'a``. ``f i j v`` takes three parameters, ``i`` and ``j`` are the coordinates of current element, and ``v`` is its value.</p></dd></dl><dl><dt class="spec value" id="val-iter"><a href="#val-iter" class="anchor"></a><code><span class="keyword">val</span> iter : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iter f x`` is the same as as ``iteri f x`` except the coordinates of the current element is not passed to the function ``f : float -&gt; 'a``</p></dd></dl><dl><dt class="spec value" id="val-mapi"><a href="#val-mapi" class="anchor"></a><code><span class="keyword">val</span> mapi : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi f x`` maps each element in ``x`` to a new value by applying ``f : int -&gt; int -&gt; float -&gt; float``. The first two parameters are the coordinates of the element, and the third parameter is the value.</p></dd></dl><dl><dt class="spec value" id="val-map"><a href="#val-map" class="anchor"></a><code><span class="keyword">val</span> map : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map f x`` is similar to ``mapi f x`` except the coordinates of the current element is not passed to the function ``f : float -&gt; float``</p></dd></dl><dl><dt class="spec value" id="val-foldi"><a href="#val-foldi" class="anchor"></a><code><span class="keyword">val</span> foldi : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``foldi ~axis f a x`` folds (or reduces) the elements in ``x`` from left along the specified ``axis`` using passed in function ``f``. ``a`` is the initial element and in ``f i acc b`` ``acc`` is the accumulater and ``b`` is one of the elemets in ``x`` along the same axis. Note that ``i`` is 1d index of ``b``.</p></dd></dl><dl><dt class="spec value" id="val-fold"><a href="#val-fold" class="anchor"></a><code><span class="keyword">val</span> fold : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``foldi``, except that the index of an element is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-scani"><a href="#val-scani" class="anchor"></a><code><span class="keyword">val</span> scani : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scan ~axis f x`` scans the ``x`` along the specified ``axis`` using passed in function ``f``. ``f acc a b`` returns an updated ``acc`` which will be passed in the next call to ``f i acc a``. This function can be used to implement accumulative operations such as ``sum`` and ``prod`` functions. Note that the ``i`` is 1d index of ``a`` in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scan"><a href="#val-scan" class="anchor"></a><code><span class="keyword">val</span> scan : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to ``scani``, except that the index of an element is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filteri"><a href="#val-filteri" class="anchor"></a><code><span class="keyword">val</span> filteri : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``filteri f x`` uses ``f : int -&gt; int -&gt; float -&gt; bool`` to filter out certain elements in ``x``. An element will be included if ``f`` returns ``true``. The returned result is a list of coordinates of the selected elements.</p></dd></dl><dl><dt class="spec value" id="val-filter"><a href="#val-filter" class="anchor"></a><code><span class="keyword">val</span> filter : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>Similar to ``filteri``, but the coordinates of the elements are not passed to the function ``f : float -&gt; bool``.</p></dd></dl><dl><dt class="spec value" id="val-iteri_2d"><a href="#val-iteri_2d" class="anchor"></a><code><span class="keyword">val</span> iteri_2d : <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to `iteri` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-mapi_2d"><a href="#val-mapi_2d" class="anchor"></a><code><span class="keyword">val</span> mapi_2d : <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to `mapi` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-foldi_2d"><a href="#val-foldi_2d" class="anchor"></a><code><span class="keyword">val</span> foldi_2d : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to `foldi` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-scani_2d"><a href="#val-scani_2d" class="anchor"></a><code><span class="keyword">val</span> scani_2d : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to `scani` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-filteri_2d"><a href="#val-filteri_2d" class="anchor"></a><code><span class="keyword">val</span> filteri_2d : <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(int * int)</span> array</span></code></dt><dd><p>Similar to `filteri` but 2d indices ``(i,j)`` are returned.</p></dd></dl><dl><dt class="spec value" id="val-iter2i_2d"><a href="#val-iter2i_2d" class="anchor"></a><code><span class="keyword">val</span> iter2i_2d : <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to `iter2i` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-map2i_2d"><a href="#val-map2i_2d" class="anchor"></a><code><span class="keyword">val</span> map2i_2d : <span>(int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Similar to `map2i` but 2d indices ``(i,j)`` are passed to the user function.</p></dd></dl><dl><dt class="spec value" id="val-iter2i"><a href="#val-iter2i" class="anchor"></a><code><span class="keyword">val</span> iter2i : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'c</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'b</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri`` but applies to two matrices ``x`` and ``y``. Both ``x`` and ``y`` must have the same shape.</p></dd></dl><dl><dt class="spec value" id="val-iter2"><a href="#val-iter2" class="anchor"></a><code><span class="keyword">val</span> iter2 : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'c</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'b</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iter2i``, except that the index is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-map2i"><a href="#val-map2i" class="anchor"></a><code><span class="keyword">val</span> map2i : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map2i f x y`` applies ``f`` to two elements of the same position in both ``x`` and ``y``. Note that 1d index is passed to funciton ``f``.</p></dd></dl><dl><dt class="spec value" id="val-map2"><a href="#val-map2" class="anchor"></a><code><span class="keyword">val</span> map2 : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map2 f x y`` is similar to ``map2i f x y`` except the index is not passed.</p></dd></dl><dl><dt class="spec value" id="val-iteri_rows"><a href="#val-iteri_rows" class="anchor"></a><code><span class="keyword">val</span> iteri_rows : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iteri_rows f x`` iterates every row in ``x`` and applies function ``f : int -&gt; mat -&gt; unit`` to each of them.</p></dd></dl><dl><dt class="spec value" id="val-iter_rows"><a href="#val-iter_rows" class="anchor"></a><code><span class="keyword">val</span> iter_rows : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri_rows`` except row number is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-iter2i_rows"><a href="#val-iter2i_rows" class="anchor"></a><code><span class="keyword">val</span> iter2i_rows : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iter2_rows f x y`` iterates rows of two matrices ``x`` and ```y``.</p></dd></dl><dl><dt class="spec value" id="val-iter2_rows"><a href="#val-iter2_rows" class="anchor"></a><code><span class="keyword">val</span> iter2_rows : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iter2iter2i_rows`` but without passing in indices.</p></dd></dl><dl><dt class="spec value" id="val-iteri_cols"><a href="#val-iteri_cols" class="anchor"></a><code><span class="keyword">val</span> iteri_cols : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``iteri_cols f x`` iterates every column in ``x`` and applies function ``f : int -&gt; mat -&gt; unit`` to each of them. Column number is passed to ``f`` as the first parameter.</p></dd></dl><dl><dt class="spec value" id="val-iter_cols"><a href="#val-iter_cols" class="anchor"></a><code><span class="keyword">val</span> iter_cols : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Similar to ``iteri_cols`` except col number is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filteri_rows"><a href="#val-filteri_rows" class="anchor"></a><code><span class="keyword">val</span> filteri_rows : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``filteri_rows f x`` uses function ``f : int -&gt; mat -&gt; bool`` to check each row in ``x``, then returns an int array containing the indices of those rows which satisfy the function ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filter_rows"><a href="#val-filter_rows" class="anchor"></a><code><span class="keyword">val</span> filter_rows : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>Similar to ``filteri_rows`` except that the row indices are not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filteri_cols"><a href="#val-filteri_cols" class="anchor"></a><code><span class="keyword">val</span> filteri_cols : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>``filteri_cols f x`` uses function ``f : int -&gt; mat -&gt; bool`` to check each column in ``x``, then returns an int array containing the indices of those columns which satisfy the function ``f``.</p></dd></dl><dl><dt class="spec value" id="val-filter_cols"><a href="#val-filter_cols" class="anchor"></a><code><span class="keyword">val</span> filter_cols : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span></code></dt><dd><p>Similar to ``filteri_cols`` except that the column indices are not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-fold_rows"><a href="#val-fold_rows" class="anchor"></a><code><span class="keyword">val</span> fold_rows : <span>(<span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span></code></dt><dd><p>``fold_rows f a x`` folds all the rows in ``x`` using function ``f``. The order of folding is from the first row to the last one.</p></dd></dl><dl><dt class="spec value" id="val-fold_cols"><a href="#val-fold_cols" class="anchor"></a><code><span class="keyword">val</span> fold_cols : <span>(<span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'c</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span></code></dt><dd><p>``fold_cols f a x`` folds all the columns in ``x`` using function ``f``. The order of folding is from the first column to the last one.</p></dd></dl><dl><dt class="spec value" id="val-mapi_rows"><a href="#val-mapi_rows" class="anchor"></a><code><span class="keyword">val</span> mapi_rows : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>``mapi_rows f x`` maps every row in ``x`` to a type ``'a`` value by applying function ``f : int -&gt; mat -&gt; 'a`` to each of them. The results is an array of all the returned values.</p></dd></dl><dl><dt class="spec value" id="val-map_rows"><a href="#val-map_rows" class="anchor"></a><code><span class="keyword">val</span> map_rows : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>Similar to ``mapi_rows`` except row number is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi_cols"><a href="#val-mapi_cols" class="anchor"></a><code><span class="keyword">val</span> mapi_cols : <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>``mapi_cols f x`` maps every column in ``x`` to a type ``'a`` value by applying function ``f : int -&gt; mat -&gt; 'a``.</p></dd></dl><dl><dt class="spec value" id="val-map_cols"><a href="#val-map_cols" class="anchor"></a><code><span class="keyword">val</span> map_cols : <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'c</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'c</span> array</span></code></dt><dd><p>Similar to ``mapi_cols`` except column number is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi_by_row"><a href="#val-mapi_by_row" class="anchor"></a><code><span class="keyword">val</span> mapi_by_row : int <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi_by_row d f x`` applies ``f`` to each row of a ``m`` by ``n`` matrix ``x``, then uses the returned ``d`` dimensional row vectors to assemble a new ``m`` by ``d`` matrix.</p></dd></dl><dl><dt class="spec value" id="val-map_by_row"><a href="#val-map_by_row" class="anchor"></a><code><span class="keyword">val</span> map_by_row : int <span>&#45;&gt;</span> <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map_by_row d f x`` is similar to ``mapi_by_row`` except that the row indices are not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi_by_col"><a href="#val-mapi_by_col" class="anchor"></a><code><span class="keyword">val</span> mapi_by_col : int <span>&#45;&gt;</span> <span>(int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi_by_col d f x`` applies ``f`` to each column of a ``m`` by ``n`` matrix ``x``, then uses the returned ``d`` dimensional column vectors to assemble a new ``d`` by ``n`` matrix.</p></dd></dl><dl><dt class="spec value" id="val-map_by_col"><a href="#val-map_by_col" class="anchor"></a><code><span class="keyword">val</span> map_by_col : int <span>&#45;&gt;</span> <span>(<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map_by_col d f x`` is similar to ``mapi_by_col`` except that the column indices are not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi_at_row"><a href="#val-mapi_at_row" class="anchor"></a><code><span class="keyword">val</span> mapi_at_row : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi_at_row f x i`` creates a new matrix by applying function ``f`` only to the ``i``th row in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-map_at_row"><a href="#val-map_at_row" class="anchor"></a><code><span class="keyword">val</span> map_at_row : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map_at_row f x i`` is similar to ``mapi_at_row`` except that the coordinates of an element is not passed to ``f``.</p></dd></dl><dl><dt class="spec value" id="val-mapi_at_col"><a href="#val-mapi_at_col" class="anchor"></a><code><span class="keyword">val</span> mapi_at_col : <span>(int <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mapi_at_col f x j`` creates a new matrix by applying function ``f`` only to the ``j``th column in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-map_at_col"><a href="#val-map_at_col" class="anchor"></a><code><span class="keyword">val</span> map_at_col : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``map_at_col f x i`` is similar to ``mapi_at_col`` except that the coordinates of an element is not passed to ``f``.</p></dd></dl></section><section><header><h6 id="examination-&amp;-comparison"><a href="#examination-&amp;-comparison" class="anchor"></a>Examination &amp; Comparison</h6></header><dl><dt class="spec value" id="val-exists"><a href="#val-exists" class="anchor"></a><code><span class="keyword">val</span> exists : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``exists f x`` checks all the elements in ``x`` using ``f``. If at least one element satisfies ``f`` then the function returns ``true`` otherwise ``false``.</p></dd></dl><dl><dt class="spec value" id="val-not_exists"><a href="#val-not_exists" class="anchor"></a><code><span class="keyword">val</span> not_exists : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_exists f x`` checks all the elements in ``x``, the function returns ``true`` only if all the elements fail to satisfy ``f : float -&gt; bool``.</p></dd></dl><dl><dt class="spec value" id="val-for_all"><a href="#val-for_all" class="anchor"></a><code><span class="keyword">val</span> for_all : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``for_all f x`` checks all the elements in ``x``, the function returns ``true`` if and only if all the elements pass the check of function ``f``.</p></dd></dl><dl><dt class="spec value" id="val-is_zero"><a href="#val-is_zero" class="anchor"></a><code><span class="keyword">val</span> is_zero : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_zero x`` returns ``true`` if all the elements in ``x`` are zeros.</p></dd></dl><dl><dt class="spec value" id="val-is_positive"><a href="#val-is_positive" class="anchor"></a><code><span class="keyword">val</span> is_positive : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_positive x`` returns ``true`` if all the elements in ``x`` are positive.</p></dd></dl><dl><dt class="spec value" id="val-is_negative"><a href="#val-is_negative" class="anchor"></a><code><span class="keyword">val</span> is_negative : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_negative x`` returns ``true`` if all the elements in ``x`` are negative.</p></dd></dl><dl><dt class="spec value" id="val-is_nonpositive"><a href="#val-is_nonpositive" class="anchor"></a><code><span class="keyword">val</span> is_nonpositive : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_nonpositive`` returns ``true`` if all the elements in ``x`` are non-positive.</p></dd></dl><dl><dt class="spec value" id="val-is_nonnegative"><a href="#val-is_nonnegative" class="anchor"></a><code><span class="keyword">val</span> is_nonnegative : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_nonnegative`` returns ``true`` if all the elements in ``x`` are non-negative.</p></dd></dl><dl><dt class="spec value" id="val-is_normal"><a href="#val-is_normal" class="anchor"></a><code><span class="keyword">val</span> is_normal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``is_normal x`` returns ``true`` if all the elelments in ``x`` are normal float numbers, i.e., not ``NaN``, not ``INF``, not ``SUBNORMAL``. Please refer to</p><p>https://www.gnu.org/software/libc/manual/html_node/Floating-Point-Classes.html https://www.gnu.org/software/libc/manual/html_node/Infinity-and-NaN.html#Infinity-and-NaN</p></dd></dl><dl><dt class="spec value" id="val-not_nan"><a href="#val-not_nan" class="anchor"></a><code><span class="keyword">val</span> not_nan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_nan x`` returns ``false`` if there is any ``NaN`` element in ``x``. Otherwise, the function returns ``true`` indicating all the numbers in ``x`` are not ``NaN``.</p></dd></dl><dl><dt class="spec value" id="val-not_inf"><a href="#val-not_inf" class="anchor"></a><code><span class="keyword">val</span> not_inf : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_inf x`` returns ``false`` if there is any positive or negative ``INF`` element in ``x``. Otherwise, the function returns ``true``.</p></dd></dl><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``equal x y`` returns ``true`` if two matrices ``x`` and ``y`` are equal.</p></dd></dl><dl><dt class="spec value" id="val-not_equal"><a href="#val-not_equal" class="anchor"></a><code><span class="keyword">val</span> not_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_equal x y`` returns ``true`` if there is at least one element in ``x`` is not equal to that in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-greater"><a href="#val-greater" class="anchor"></a><code><span class="keyword">val</span> greater : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater x y`` returns ``true`` if all the elements in ``x`` are greater than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-less"><a href="#val-less" class="anchor"></a><code><span class="keyword">val</span> less : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less x y`` returns ``true`` if all the elements in ``x`` are smaller than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-greater_equal"><a href="#val-greater_equal" class="anchor"></a><code><span class="keyword">val</span> greater_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_equal x y`` returns ``true`` if all the elements in ``x`` are not smaller than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-less_equal"><a href="#val-less_equal" class="anchor"></a><code><span class="keyword">val</span> less_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_equal x y`` returns ``true`` if all the elements in ``x`` are not greater than the corresponding elements in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal"><a href="#val-elt_equal" class="anchor"></a><code><span class="keyword">val</span> elt_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_equal x y`` performs element-wise ``=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a = b``.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal"><a href="#val-elt_not_equal" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_not_equal x y`` performs element-wise ``!=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt;&gt; b``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less"><a href="#val-elt_less" class="anchor"></a><code><span class="keyword">val</span> elt_less : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less x y`` performs element-wise ``&lt;`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt; b``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater"><a href="#val-elt_greater" class="anchor"></a><code><span class="keyword">val</span> elt_greater : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater x y`` performs element-wise ``&gt;`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &gt; b``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal"><a href="#val-elt_less_equal" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_equal x y`` performs element-wise ``&lt;=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &lt;= b``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal"><a href="#val-elt_greater_equal" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_equal x y`` performs element-wise ``&gt;=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a &gt;= b``.</p></dd></dl><dl><dt class="spec value" id="val-equal_scalar"><a href="#val-equal_scalar" class="anchor"></a><code><span class="keyword">val</span> equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``equal_scalar x a`` checks if all the elements in ``x`` are equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b = a``.</p></dd></dl><dl><dt class="spec value" id="val-not_equal_scalar"><a href="#val-not_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> not_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``not_equal_scalar x a`` checks if all the elements in ``x`` are not equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt;&gt; a``.</p></dd></dl><dl><dt class="spec value" id="val-less_scalar"><a href="#val-less_scalar" class="anchor"></a><code><span class="keyword">val</span> less_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_scalar x a`` checks if all the elements in ``x`` are less than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt; a``.</p></dd></dl><dl><dt class="spec value" id="val-greater_scalar"><a href="#val-greater_scalar" class="anchor"></a><code><span class="keyword">val</span> greater_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_scalar x a`` checks if all the elements in ``x`` are greater than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &gt; a``.</p></dd></dl><dl><dt class="spec value" id="val-less_equal_scalar"><a href="#val-less_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> less_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``less_equal_scalar x a`` checks if all the elements in ``x`` are less or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &lt;= a``.</p></dd></dl><dl><dt class="spec value" id="val-greater_equal_scalar"><a href="#val-greater_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> greater_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``greater_equal_scalar x a`` checks if all the elements in ``x`` are greater or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b &gt;= a``.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_scalar"><a href="#val-elt_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_equal_scalar x a`` performs element-wise ``=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a = b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_scalar"><a href="#val-elt_not_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_not_equal_scalar x a`` performs element-wise ``!=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt;&gt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_scalar"><a href="#val-elt_less_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_less_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_scalar x a`` performs element-wise ``&lt;`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_scalar"><a href="#val-elt_greater_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_greater_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_scalar x a`` performs element-wise ``&gt;`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &gt; b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_scalar"><a href="#val-elt_less_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_less_equal_scalar x a`` performs element-wise ``&lt;=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &lt;= b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_scalar"><a href="#val-elt_greater_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``elt_greater_equal_scalar x a`` performs element-wise ``&gt;=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a &gt;= b``, otherwise ``0``.</p></dd></dl><dl><dt class="spec value" id="val-approx_equal"><a href="#val-approx_equal" class="anchor"></a><code><span class="keyword">val</span> approx_equal : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``approx_equal ~eps x y`` returns ``true`` if ``x`` and ``y`` are approximately equal, i.e., for any two elements ``a`` from ``x`` and ``b`` from ``y``, we have ``abs (a - b) &lt; eps``.</p><p>Note: the threshold check is exclusive for passed in ``eps``.</p></dd></dl><dl><dt class="spec value" id="val-approx_equal_scalar"><a href="#val-approx_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> approx_equal_scalar : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>``approx_equal_scalar ~eps x a`` returns ``true`` all the elements in ``x`` are approximately equal to ``a``, i.e., ``abs (x - a) &lt; eps``. For complex numbers, the ``eps`` applies to both real and imaginary part.</p><p>Note: the threshold check is exclusive for the passed in ``eps``.</p></dd></dl><dl><dt class="spec value" id="val-approx_elt_equal"><a href="#val-approx_elt_equal" class="anchor"></a><code><span class="keyword">val</span> approx_elt_equal : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``approx_elt_equal ~eps x y`` compares the element-wise equality of ``x`` and ``y``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that two corresponding elements ``a`` from ``x`` and ``b`` from ``y`` are considered as approximately equal, namely ``abs (a - b) &lt; eps``.</p></dd></dl><dl><dt class="spec value" id="val-approx_elt_equal_scalar"><a href="#val-approx_elt_equal_scalar" class="anchor"></a><code><span class="keyword">val</span> approx_elt_equal_scalar : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``approx_elt_equal_scalar ~eps x a`` compares all the elements of ``x`` to a scalar value ``a``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that the element ``b`` from ``x`` is considered as approximately equal to ``a``, namely ``abs (a - b) &lt; eps``.</p></dd></dl></section><section><header><h6 id="randomisation-functions"><a href="#randomisation-functions" class="anchor"></a>Randomisation functions</h6></header><dl><dt class="spec value" id="val-draw_rows"><a href="#val-draw_rows" class="anchor"></a><code><span class="keyword">val</span> draw_rows : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>``draw_rows x m`` draws ``m`` rows randomly from ``x``. The row indices are also returned in an int array along with the selected rows. The parameter ``replacement`` indicates whether the drawing is by replacement or not.</p></dd></dl><dl><dt class="spec value" id="val-draw_cols"><a href="#val-draw_cols" class="anchor"></a><code><span class="keyword">val</span> draw_cols : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>``draw_cols x m`` draws ``m`` cols randomly from ``x``. The column indices are also returned in an int array along with the selected columns. The parameter ``replacement`` indicates whether the drawing is by replacement or not.</p></dd></dl><dl><dt class="spec value" id="val-draw_rows2"><a href="#val-draw_rows2" class="anchor"></a><code><span class="keyword">val</span> draw_rows2 : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>``draw_rows2 x y c`` is similar to ``draw_rows`` but applies to two matrices.</p></dd></dl><dl><dt class="spec value" id="val-draw_cols2"><a href="#val-draw_cols2" class="anchor"></a><code><span class="keyword">val</span> draw_cols2 : <span>?&#8288;replacement:bool</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span>int array</span></code></dt><dd><p>``draw_col2 x y c`` is similar to ``draw_cols`` but applies to two matrices.</p></dd></dl><dl><dt class="spec value" id="val-shuffle_rows"><a href="#val-shuffle_rows" class="anchor"></a><code><span class="keyword">val</span> shuffle_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``shuffle_rows x`` shuffles all the rows in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-shuffle_cols"><a href="#val-shuffle_cols" class="anchor"></a><code><span class="keyword">val</span> shuffle_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``shuffle_cols x`` shuffles all the columns in matrix ``x``.</p></dd></dl><dl><dt class="spec value" id="val-shuffle"><a href="#val-shuffle" class="anchor"></a><code><span class="keyword">val</span> shuffle : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``shuffle x`` shuffles all the elements in ``x`` by first shuffling along the rows then shuffling along columns. It is equivalent to ``shuffle_cols (shuffle_rows x)``.</p></dd></dl></section><section><header><h6 id="input/output-functions"><a href="#input/output-functions" class="anchor"></a>Input/Output functions</h6></header><dl><dt class="spec value" id="val-to_array"><a href="#val-to_array" class="anchor"></a><code><span class="keyword">val</span> to_array : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span></code></dt><dd><p>``to_array x`` flattens an ``m`` by ``n`` matrix ``x`` then returns ``x`` as an float array of length ``(numel x)``.</p></dd></dl><dl><dt class="spec value" id="val-of_array"><a href="#val-of_array" class="anchor"></a><code><span class="keyword">val</span> of_array : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> array</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``of_array x m n`` converts a float array ``x`` into an ``m`` by ``n`` matrix. Note the length of ``x`` must be equal to ``(m * n)``.</p><p>Similar to ``reshape`` function, you can pass in one negative index to let Owl automatically infer its dimension.</p></dd></dl><dl><dt class="spec value" id="val-to_arrays"><a href="#val-to_arrays" class="anchor"></a><code><span class="keyword">val</span> to_arrays : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span class="type-var">'a</span> array</span> array</span></code></dt><dd><p>``to arrays x`` returns an array of float arrays, wherein each row in ``x`` becomes an array in the result.</p></dd></dl><dl><dt class="spec value" id="val-of_arrays"><a href="#val-of_arrays" class="anchor"></a><code><span class="keyword">val</span> of_arrays : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span><span class="type-var">'a</span> array</span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``of_arrays x`` converts an array of ``m`` float arrays (of length ``n``) in to an ``m`` by ``n`` matrix.</p></dd></dl><dl><dt class="spec value" id="val-to_rows"><a href="#val-to_rows" class="anchor"></a><code><span class="keyword">val</span> to_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dt class="spec value" id="val-of_rows"><a href="#val-of_rows" class="anchor"></a><code><span class="keyword">val</span> of_rows : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dt class="spec value" id="val-to_cols"><a href="#val-to_cols" class="anchor"></a><code><span class="keyword">val</span> to_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span></code></dt><dt class="spec value" id="val-of_cols"><a href="#val-of_cols" class="anchor"></a><code><span class="keyword">val</span> of_cols : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> array</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dt class="spec value" id="val-print"><a href="#val-print" class="anchor"></a><code><span class="keyword">val</span> print : <span>?&#8288;max_row:int</span> <span>&#45;&gt;</span> <span>?&#8288;max_col:int</span> <span>&#45;&gt;</span> <span>?&#8288;header:bool</span> <span>&#45;&gt;</span> <span>?&#8288;fmt:<span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> string)</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``print x`` pretty prints matrix ``x`` without headings.</p></dd></dl><dl><dt class="spec value" id="val-save"><a href="#val-save" class="anchor"></a><code><span class="keyword">val</span> save : <span>out:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``save x ~out`` saves the matrix ``x`` to a file with the name ``out``. The format is binary by using ``Marshal`` module to serialise the matrix.</p></dd></dl><dl><dt class="spec value" id="val-load"><a href="#val-load" class="anchor"></a><code><span class="keyword">val</span> load : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``load f`` loads a matrix from file ``f``. The file must be previously saved by using ``save`` function.</p></dd></dl><dl><dt class="spec value" id="val-save_txt"><a href="#val-save_txt" class="anchor"></a><code><span class="keyword">val</span> save_txt : <span>?&#8288;sep:string</span> <span>&#45;&gt;</span> <span>?&#8288;append:bool</span> <span>&#45;&gt;</span> <span>out:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``save_txt ~sep ~append ~out x`` saves the matrix ``x`` into a text file ``out`` delimited by the specified string ``sep`` (default: tab). If ``append`` is ``false`` (it is by default), an existing file will be truncated and overwritten. If ``append`` is ``true`` and the file exists, new rows will be appended to it. Files are created, if necessary, with the AND of 0o644 and the user's umask value. Note that the operation can be very time consuming.</p></dd></dl><dl><dt class="spec value" id="val-load_txt"><a href="#val-load_txt" class="anchor"></a><code><span class="keyword">val</span> load_txt : <span>?&#8288;sep:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``load_txt ~sep k f`` load a text file ``f`` into a matrix of type ``k``. The delimitor is specified by ``sep`` which can be a regular expression.</p></dd></dl><dl><dt class="spec value" id="val-save_npy"><a href="#val-save_npy" class="anchor"></a><code><span class="keyword">val</span> save_npy : <span>out:string</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``save_npy ~out x`` saves the matrix ``x`` into a npy file ``out``. This function is implemented using npy-ocaml https://github.com/LaurentMazare/npy-ocaml.</p></dd></dl><dl><dt class="spec value" id="val-load_npy"><a href="#val-load_npy" class="anchor"></a><code><span class="keyword">val</span> load_npy : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``load_npy file`` load a npy ``file`` into a matrix of type ``k``. If the matrix is in the file is not of type ``k``, fails with ``<code>file</code>: incorrect format``. This function is implemented using npy-ocaml https://github.com/LaurentMazare/npy-ocaml.</p></dd></dl></section><section><header><h6 id="unary-math-operators"><a href="#unary-math-operators" class="anchor"></a>Unary math operators</h6></header><dl><dt class="spec value" id="val-re_c2s"><a href="#val-re_c2s" class="anchor"></a><code><span class="keyword">val</span> re_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``re_c2s x`` returns all the real components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-re_z2d"><a href="#val-re_z2d" class="anchor"></a><code><span class="keyword">val</span> re_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``re_d2z x`` returns all the real components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-im_c2s"><a href="#val-im_c2s" class="anchor"></a><code><span class="keyword">val</span> im_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``im_c2s x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-im_z2d"><a href="#val-im_z2d" class="anchor"></a><code><span class="keyword">val</span> im_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``im_d2z x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.</p></dd></dl><dl><dt class="spec value" id="val-min"><a href="#val-min" class="anchor"></a><code><span class="keyword">val</span> min : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``min x`` returns the minimum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the minimum of all the elements will be returned. For two complex numbers, the one with the smaller magnitude will be selected. If two magnitudes are the same, the one with the smaller phase will be selected.</p></dd></dl><dl><dt class="spec value" id="val-min'"><a href="#val-min'" class="anchor"></a><code><span class="keyword">val</span> min' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``min' x`` is similar to ``min`` but returns the minimum of all elements in ``x`` in scalar value.</p></dd></dl><dl><dt class="spec value" id="val-max"><a href="#val-max" class="anchor"></a><code><span class="keyword">val</span> max : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``max x`` returns the maximum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the maximum of all the elements will be returned. For two complex numbers, the one with the greater magnitude will be selected. If two magnitudes are the same, the one with the greater phase will be selected.</p></dd></dl><dl><dt class="spec value" id="val-max'"><a href="#val-max'" class="anchor"></a><code><span class="keyword">val</span> max' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``max' x`` is similar to ``max`` but returns the maximum of all elements in ``x`` in scalar value.</p></dd></dl><dl><dt class="spec value" id="val-minmax"><a href="#val-minmax" class="anchor"></a><code><span class="keyword">val</span> minmax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.</p></dd></dl><dl><dt class="spec value" id="val-minmax'"><a href="#val-minmax'" class="anchor"></a><code><span class="keyword">val</span> minmax' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span class="type-var">'a</span></code></dt><dd><p>``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.</p></dd></dl><dl><dt class="spec value" id="val-min_i"><a href="#val-min_i" class="anchor"></a><code><span class="keyword">val</span> min_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span>int array</span></code></dt><dd><p>``min_i x`` returns the minimum of all elements in ``x`` as well as its index.</p></dd></dl><dl><dt class="spec value" id="val-max_i"><a href="#val-max_i" class="anchor"></a><code><span class="keyword">val</span> max_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> * <span>int array</span></code></dt><dd><p>``max_i x`` returns the maximum of all elements in ``x`` as well as its index.</p></dd></dl><dl><dt class="spec value" id="val-minmax_i"><a href="#val-minmax_i" class="anchor"></a><code><span class="keyword">val</span> minmax_i : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>(<span class="type-var">'a</span> * <span>int array</span>)</span> * <span>(<span class="type-var">'a</span> * <span>int array</span>)</span></code></dt><dd><p>``minmax_i x`` returns ``((min_v,min_i), (max_v,max_i))`` where ``(min_v,min_i)`` is the minimum value in ``x`` along with its index while ``(max_v,max_i)`` is the maximum value along its index.</p></dd></dl><dl><dt class="spec value" id="val-trace"><a href="#val-trace" class="anchor"></a><code><span class="keyword">val</span> trace : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``trace x`` returns the sum of diagonal elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sum"><a href="#val-sum" class="anchor"></a><code><span class="keyword">val</span> sum : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum_ axis x`` sums the elements in ``x`` along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-sum'"><a href="#val-sum'" class="anchor"></a><code><span class="keyword">val</span> sum' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``sum x`` returns the summation of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-prod"><a href="#val-prod" class="anchor"></a><code><span class="keyword">val</span> prod : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``prod_ axis x`` multiplies the elements in ``x`` along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-prod'"><a href="#val-prod'" class="anchor"></a><code><span class="keyword">val</span> prod' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``prod x`` returns the product of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-mean"><a href="#val-mean" class="anchor"></a><code><span class="keyword">val</span> mean : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mean ~axis x`` calculates the mean along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-mean'"><a href="#val-mean'" class="anchor"></a><code><span class="keyword">val</span> mean' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``mean' x`` calculates the mean of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-var"><a href="#val-var" class="anchor"></a><code><span class="keyword">val</span> var : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``var ~axis x`` calculates the variance along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-var'"><a href="#val-var'" class="anchor"></a><code><span class="keyword">val</span> var' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``var' x`` calculates the variance of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-std"><a href="#val-std" class="anchor"></a><code><span class="keyword">val</span> std : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``std ~axis`` calculates the standard deviation along specified ``axis``.</p></dd></dl><dl><dt class="spec value" id="val-std'"><a href="#val-std'" class="anchor"></a><code><span class="keyword">val</span> std' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``std' x`` calculates the standard deviation of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sum_rows"><a href="#val-sum_rows" class="anchor"></a><code><span class="keyword">val</span> sum_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum_rows x`` returns the summation of all the row vectors in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sum_cols"><a href="#val-sum_cols" class="anchor"></a><code><span class="keyword">val</span> sum_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sum_cols`` returns the summation of all the column vectors in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-mean_rows"><a href="#val-mean_rows" class="anchor"></a><code><span class="keyword">val</span> mean_rows : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mean_rows x`` returns the mean value of all row vectors in ``x``. It is equivalent to ``div_scalar (sum_rows x) (float_of_int (row_num x))``.</p></dd></dl><dl><dt class="spec value" id="val-mean_cols"><a href="#val-mean_cols" class="anchor"></a><code><span class="keyword">val</span> mean_cols : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mean_cols x`` returns the mean value of all column vectors in ``x``. It is equivalent to ``div_scalar (sum_cols x) (float_of_int (col_num x))``.</p></dd></dl><dl><dt class="spec value" id="val-min_rows"><a href="#val-min_rows" class="anchor"></a><code><span class="keyword">val</span> min_rows : <span><span>(float, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float * int * int)</span> array</span></code></dt><dd><p>``min_rows x`` returns the minimum value in each row along with their coordinates.</p></dd></dl><dl><dt class="spec value" id="val-min_cols"><a href="#val-min_cols" class="anchor"></a><code><span class="keyword">val</span> min_cols : <span><span>(float, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float * int * int)</span> array</span></code></dt><dd><p>``min_cols x`` returns the minimum value in each column along with their coordinates.</p></dd></dl><dl><dt class="spec value" id="val-max_rows"><a href="#val-max_rows" class="anchor"></a><code><span class="keyword">val</span> max_rows : <span><span>(float, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float * int * int)</span> array</span></code></dt><dd><p>``max_rows x`` returns the maximum value in each row along with their coordinates.</p></dd></dl><dl><dt class="spec value" id="val-max_cols"><a href="#val-max_cols" class="anchor"></a><code><span class="keyword">val</span> max_cols : <span><span>(float, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float * int * int)</span> array</span></code></dt><dd><p>``max_cols x`` returns the maximum value in each column along with their coordinates.</p></dd></dl><dl><dt class="spec value" id="val-abs"><a href="#val-abs" class="anchor"></a><code><span class="keyword">val</span> abs : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs x`` returns the absolute value of all elements in ``x`` in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-abs_c2s"><a href="#val-abs_c2s" class="anchor"></a><code><span class="keyword">val</span> abs_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs_c2s x`` is similar to ``abs`` but takes ``complex32`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs_z2d"><a href="#val-abs_z2d" class="anchor"></a><code><span class="keyword">val</span> abs_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs_z2d x`` is similar to ``abs`` but takes ``complex64`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs2"><a href="#val-abs2" class="anchor"></a><code><span class="keyword">val</span> abs2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2 x`` returns the square of absolute value of all elements in ``x`` in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-abs2_c2s"><a href="#val-abs2_c2s" class="anchor"></a><code><span class="keyword">val</span> abs2_c2s : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2_c2s x`` is similar to ``abs2`` but takes ``complex32`` as input.</p></dd></dl><dl><dt class="spec value" id="val-abs2_z2d"><a href="#val-abs2_z2d" class="anchor"></a><code><span class="keyword">val</span> abs2_z2d : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``abs2_z2d x`` is similar to ``abs2`` but takes ``complex64`` as input.</p></dd></dl><dl><dt class="spec value" id="val-conj"><a href="#val-conj" class="anchor"></a><code><span class="keyword">val</span> conj : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``conj x`` computes the conjugate of the elements in ``x`` and returns the result in a new matrix. If the passed in ``x`` is a real matrix, the function simply returns a copy of the original ``x``.</p></dd></dl><dl><dt class="spec value" id="val-neg"><a href="#val-neg" class="anchor"></a><code><span class="keyword">val</span> neg : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``neg x`` negates the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-reci"><a href="#val-reci" class="anchor"></a><code><span class="keyword">val</span> reci : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reci x`` computes the reciprocal of every elements in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-reci_tol"><a href="#val-reci_tol" class="anchor"></a><code><span class="keyword">val</span> reci_tol : <span>?&#8288;tol:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``reci_tol ~tol x`` computes the reciprocal of every element in ``x``. Different from ``reci``, ``reci_tol`` sets the elements whose ``abs`` value smaller than ``tol`` to zeros. If ``tol`` is not specified, the defautl ``Owl_utils.eps Float32`` will be used. For complex numbers, refer to Owl's doc to see how to compare.</p></dd></dl><dl><dt class="spec value" id="val-signum"><a href="#val-signum" class="anchor"></a><code><span class="keyword">val</span> signum : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``signum`` computes the sign value (``-1`` for negative numbers, ``0`` (or ``-0``) for zero, ``1`` for positive numbers, ``nan`` for ``nan``).</p></dd></dl><dl><dt class="spec value" id="val-sqr"><a href="#val-sqr" class="anchor"></a><code><span class="keyword">val</span> sqr : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sqr x`` computes the square of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-sqrt"><a href="#val-sqrt" class="anchor"></a><code><span class="keyword">val</span> sqrt : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sqrt x`` computes the square root of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-cbrt"><a href="#val-cbrt" class="anchor"></a><code><span class="keyword">val</span> cbrt : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cbrt x`` computes the cubic root of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-exp"><a href="#val-exp" class="anchor"></a><code><span class="keyword">val</span> exp : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp x`` computes the exponential of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-exp2"><a href="#val-exp2" class="anchor"></a><code><span class="keyword">val</span> exp2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp2 x`` computes the base-2 exponential of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-exp10"><a href="#val-exp10" class="anchor"></a><code><span class="keyword">val</span> exp10 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``exp2 x`` computes the base-10 exponential of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-expm1"><a href="#val-expm1" class="anchor"></a><code><span class="keyword">val</span> expm1 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``expm1 x`` computes ``exp x -. 1.`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-log"><a href="#val-log" class="anchor"></a><code><span class="keyword">val</span> log : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log x`` computes the logarithm of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-log10"><a href="#val-log10" class="anchor"></a><code><span class="keyword">val</span> log10 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log10 x`` computes the base-10 logarithm of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-log2"><a href="#val-log2" class="anchor"></a><code><span class="keyword">val</span> log2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log2 x`` computes the base-2 logarithm of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-log1p"><a href="#val-log1p" class="anchor"></a><code><span class="keyword">val</span> log1p : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``log1p x`` computes ``log (1 + x)`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-sin"><a href="#val-sin" class="anchor"></a><code><span class="keyword">val</span> sin : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sin x`` computes the sine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-cos"><a href="#val-cos" class="anchor"></a><code><span class="keyword">val</span> cos : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cos x`` computes the cosine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-tan"><a href="#val-tan" class="anchor"></a><code><span class="keyword">val</span> tan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tan x`` computes the tangent of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-asin"><a href="#val-asin" class="anchor"></a><code><span class="keyword">val</span> asin : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``asin x`` computes the arc sine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-acos"><a href="#val-acos" class="anchor"></a><code><span class="keyword">val</span> acos : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``acos x`` computes the arc cosine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-atan"><a href="#val-atan" class="anchor"></a><code><span class="keyword">val</span> atan : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atan x`` computes the arc tangent of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-sinh"><a href="#val-sinh" class="anchor"></a><code><span class="keyword">val</span> sinh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sinh x`` computes the hyperbolic sine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-cosh"><a href="#val-cosh" class="anchor"></a><code><span class="keyword">val</span> cosh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cosh x`` computes the hyperbolic cosine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-tanh"><a href="#val-tanh" class="anchor"></a><code><span class="keyword">val</span> tanh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``tanh x`` computes the hyperbolic tangent of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-asinh"><a href="#val-asinh" class="anchor"></a><code><span class="keyword">val</span> asinh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``asinh x`` computes the hyperbolic arc sine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-acosh"><a href="#val-acosh" class="anchor"></a><code><span class="keyword">val</span> acosh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``acosh x`` computes the hyperbolic arc cosine of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-atanh"><a href="#val-atanh" class="anchor"></a><code><span class="keyword">val</span> atanh : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atanh x`` computes the hyperbolic arc tangent of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-floor"><a href="#val-floor" class="anchor"></a><code><span class="keyword">val</span> floor : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``floor x`` computes the floor of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-ceil"><a href="#val-ceil" class="anchor"></a><code><span class="keyword">val</span> ceil : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``ceil x`` computes the ceiling of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-round"><a href="#val-round" class="anchor"></a><code><span class="keyword">val</span> round : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``round x`` rounds the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-trunc"><a href="#val-trunc" class="anchor"></a><code><span class="keyword">val</span> trunc : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``trunc x`` computes the truncation of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-fix"><a href="#val-fix" class="anchor"></a><code><span class="keyword">val</span> fix : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fix x`` rounds each element of ``x`` to the nearest integer toward zero. For positive elements, the behavior is the same as ``floor``. For negative ones, the behavior is the same as ``ceil``.</p></dd></dl><dl><dt class="spec value" id="val-modf"><a href="#val-modf" class="anchor"></a><code><span class="keyword">val</span> modf : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> * <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``modf x`` performs ``modf`` over all the elements in ``x``, the fractal part is saved in the first element of the returned tuple whereas the integer part is saved in the second element.</p></dd></dl><dl><dt class="spec value" id="val-erf"><a href="#val-erf" class="anchor"></a><code><span class="keyword">val</span> erf : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``erf x`` computes the error function of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-erfc"><a href="#val-erfc" class="anchor"></a><code><span class="keyword">val</span> erfc : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``erfc x`` computes the complementary error function of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-logistic"><a href="#val-logistic" class="anchor"></a><code><span class="keyword">val</span> logistic : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``logistic x`` computes the logistic function ``1/(1 + exp(-a)`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-relu"><a href="#val-relu" class="anchor"></a><code><span class="keyword">val</span> relu : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``relu x`` computes the rectified linear unit function ``max(x, 0)`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-elu"><a href="#val-elu" class="anchor"></a><code><span class="keyword">val</span> elu : <span>?&#8288;alpha:float</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>refer to ``Owl_dense_ndarray_generic.elu``</p></dd></dl><dl><dt class="spec value" id="val-leaky_relu"><a href="#val-leaky_relu" class="anchor"></a><code><span class="keyword">val</span> leaky_relu : <span>?&#8288;alpha:float</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>refer to ``Owl_dense_ndarray_generic.leaky_relu``</p></dd></dl><dl><dt class="spec value" id="val-softplus"><a href="#val-softplus" class="anchor"></a><code><span class="keyword">val</span> softplus : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softplus x`` computes the softplus function ``log(1 + exp(x)`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-softsign"><a href="#val-softsign" class="anchor"></a><code><span class="keyword">val</span> softsign : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softsign x`` computes the softsign function ``x / (1 + abs(x))`` of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-softmax"><a href="#val-softmax" class="anchor"></a><code><span class="keyword">val</span> softmax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``softmax x`` computes the softmax functions ``(exp x) / (sum (exp x))`` of all the elements along the specified ``axis`` in ``x`` and returns the result in a new ndarray.</p></dd></dl><dl><dt class="spec value" id="val-sigmoid"><a href="#val-sigmoid" class="anchor"></a><code><span class="keyword">val</span> sigmoid : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sigmoid x`` computes the sigmoid function ``1 / (1 + exp (-x))`` for each element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-log_sum_exp'"><a href="#val-log_sum_exp'" class="anchor"></a><code><span class="keyword">val</span> log_sum_exp' : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``log_sum_exp x`` computes the logarithm of the sum of exponentials of all the elements in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l1norm"><a href="#val-l1norm" class="anchor"></a><code><span class="keyword">val</span> l1norm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l1norm x`` calculates the l1-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l1norm'"><a href="#val-l1norm'" class="anchor"></a><code><span class="keyword">val</span> l1norm' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l1norm x`` calculates the l1-norm of all the element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l2norm"><a href="#val-l2norm" class="anchor"></a><code><span class="keyword">val</span> l2norm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l2norm x`` calculates the l2-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l2norm'"><a href="#val-l2norm'" class="anchor"></a><code><span class="keyword">val</span> l2norm' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l2norm x`` calculates the l2-norm of all the element in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-l2norm_sqr"><a href="#val-l2norm_sqr" class="anchor"></a><code><span class="keyword">val</span> l2norm_sqr : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``l2norm x`` calculates the square l2-norm of of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-l2norm_sqr'"><a href="#val-l2norm_sqr'" class="anchor"></a><code><span class="keyword">val</span> l2norm_sqr' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``l2norm_sqr x`` calculates the square of l2-norm (or l2norm, Euclidean norm) of all elements in ``x``. The function uses conjugate transpose in the product, hence it always returns a float number.</p></dd></dl><dl><dt class="spec value" id="val-vecnorm"><a href="#val-vecnorm" class="anchor"></a><code><span class="keyword">val</span> vecnorm : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_ndarray_generic`.</p></dd></dl><dl><dt class="spec value" id="val-vecnorm'"><a href="#val-vecnorm'" class="anchor"></a><code><span class="keyword">val</span> vecnorm' : <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Refer to :doc:`owl_dense_ndarray_generic`.</p></dd></dl><dl><dt class="spec value" id="val-max_pool"><a href="#val-max_pool" class="anchor"></a><code><span class="keyword">val</span> max_pool : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_ndarray_generic`.</p></dd></dl><dl><dt class="spec value" id="val-avg_pool"><a href="#val-avg_pool" class="anchor"></a><code><span class="keyword">val</span> avg_pool : <span>?&#8288;padding:<a href="../../../owl-base/Owl_types/index.html#type-padding">Owl_types.padding</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Refer to :doc:`owl_dense_ndarray_generic`.</p></dd></dl><dl><dt class="spec value" id="val-cumsum"><a href="#val-cumsum" class="anchor"></a><code><span class="keyword">val</span> cumsum : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cumsum ~axis x``, refer to the documentation in ``Owl_dense_ndarray_generic``.</p></dd></dl><dl><dt class="spec value" id="val-cumprod"><a href="#val-cumprod" class="anchor"></a><code><span class="keyword">val</span> cumprod : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cumprod ~axis x``, refer to the documentation in ``Owl_dense_ndarray_generic``.</p></dd></dl><dl><dt class="spec value" id="val-cummin"><a href="#val-cummin" class="anchor"></a><code><span class="keyword">val</span> cummin : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cummin ~axis x`` : performs cumulative ``min`` along ``axis`` dimension.</p></dd></dl><dl><dt class="spec value" id="val-cummax"><a href="#val-cummax" class="anchor"></a><code><span class="keyword">val</span> cummax : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cummax ~axis x`` : performs cumulative ``max`` along ``axis`` dimension.</p></dd></dl><dl><dt class="spec value" id="val-diff"><a href="#val-diff" class="anchor"></a><code><span class="keyword">val</span> diff : <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span>?&#8288;n:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``diff ~axis ~n x`` calculates the ``n``-th difference of ``x`` along the specified ``axis``.</p><p>Parameters: * ``axis``: axis to calculate the difference. The default value is the highest dimension. * ``n``: how many times to calculate the difference. The default value is 1.</p><p>Return: * The difference ndarray y. Note the shape of ``y`` 1 less than that of ``x`` along specified axis.</p></dd></dl><dl><dt class="spec value" id="val-angle"><a href="#val-angle" class="anchor"></a><code><span class="keyword">val</span> angle : <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``angle x`` calculates the phase angle of all complex numbers in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-proj"><a href="#val-proj" class="anchor"></a><code><span class="keyword">val</span> proj : <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``proj x`` computes the projection on Riemann sphere of all elelments in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-mat2gray"><a href="#val-mat2gray" class="anchor"></a><code><span class="keyword">val</span> mat2gray : <span>?&#8288;amin:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;amax:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mat2gray ~amin ~amax x`` converts the matrix ``x`` to the intensity image. The elements in ``x`` are clipped by ``amin`` and ``amax``, and they will be between ``0.`` and ``1.`` after conversion to represents the intensity.</p></dd></dl><dl><dt class="spec value" id="val-lgamma"><a href="#val-lgamma" class="anchor"></a><code><span class="keyword">val</span> lgamma : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``lgamma x`` computes the loggamma of the elements in ``x`` and returns the result in a new matrix.</p></dd></dl></section><section><header><h6 id="binary-math-operators"><a href="#binary-math-operators" class="anchor"></a>Binary math operators</h6></header><dl><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``add x y`` adds all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-sub"><a href="#val-sub" class="anchor"></a><code><span class="keyword">val</span> sub : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sub x y`` subtracts all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-mul"><a href="#val-mul" class="anchor"></a><code><span class="keyword">val</span> mul : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mul x y`` multiplies all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-div"><a href="#val-div" class="anchor"></a><code><span class="keyword">val</span> div : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``div x y`` divides all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-add_scalar"><a href="#val-add_scalar" class="anchor"></a><code><span class="keyword">val</span> add_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``add_scalar x a`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-sub_scalar"><a href="#val-sub_scalar" class="anchor"></a><code><span class="keyword">val</span> sub_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``sub_scalar x a`` subtracts a scalar value ``a`` from each element in ``x``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-mul_scalar"><a href="#val-mul_scalar" class="anchor"></a><code><span class="keyword">val</span> mul_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``mul_scalar x a`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-div_scalar"><a href="#val-div_scalar" class="anchor"></a><code><span class="keyword">val</span> div_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``div_scalar x a`` divides each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_add"><a href="#val-scalar_add" class="anchor"></a><code><span class="keyword">val</span> scalar_add : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_add a x`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_sub"><a href="#val-scalar_sub" class="anchor"></a><code><span class="keyword">val</span> scalar_sub : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_sub a x`` subtracts each element in ``x`` from a scalar value ``a``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_mul"><a href="#val-scalar_mul" class="anchor"></a><code><span class="keyword">val</span> scalar_mul : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_mul a x`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_div"><a href="#val-scalar_div" class="anchor"></a><code><span class="keyword">val</span> scalar_div : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_div a x`` divides a scalar value ``a`` by each element in ``x``, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-dot"><a href="#val-dot" class="anchor"></a><code><span class="keyword">val</span> dot : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``dot x y`` returns the matrix product of matrix ``x`` and ``y``.</p></dd></dl><dl><dt class="spec value" id="val-add_diag"><a href="#val-add_diag" class="anchor"></a><code><span class="keyword">val</span> add_diag : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``add_diag x a`` adds ``a`` to the diagonal elements in ``x``. A new copy of the data is returned.</p></dd></dl><dl><dt class="spec value" id="val-pow"><a href="#val-pow" class="anchor"></a><code><span class="keyword">val</span> pow : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``pow x y`` computes ``pow(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_pow"><a href="#val-scalar_pow" class="anchor"></a><code><span class="keyword">val</span> scalar_pow : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_pow a x``</p></dd></dl><dl><dt class="spec value" id="val-pow_scalar"><a href="#val-pow_scalar" class="anchor"></a><code><span class="keyword">val</span> pow_scalar : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``pow_scalar x a``</p></dd></dl><dl><dt class="spec value" id="val-atan2"><a href="#val-atan2" class="anchor"></a><code><span class="keyword">val</span> atan2 : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``atan2 x y`` computes ``atan2(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-scalar_atan2"><a href="#val-scalar_atan2" class="anchor"></a><code><span class="keyword">val</span> scalar_atan2 : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_atan2 a x``</p></dd></dl><dl><dt class="spec value" id="val-atan2_scalar"><a href="#val-atan2_scalar" class="anchor"></a><code><span class="keyword">val</span> atan2_scalar : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_atan2 x a``</p></dd></dl><dl><dt class="spec value" id="val-hypot"><a href="#val-hypot" class="anchor"></a><code><span class="keyword">val</span> hypot : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``hypot x y`` computes ``sqrt(x*x + y*y)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-min2"><a href="#val-min2" class="anchor"></a><code><span class="keyword">val</span> min2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``min2 x y`` computes the minimum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-max2"><a href="#val-max2" class="anchor"></a><code><span class="keyword">val</span> max2 : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``max2 x y`` computes the maximum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.</p></dd></dl><dl><dt class="spec value" id="val-fmod"><a href="#val-fmod" class="anchor"></a><code><span class="keyword">val</span> fmod : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fmod x y`` performs float modulus division.</p></dd></dl><dl><dt class="spec value" id="val-fmod_scalar"><a href="#val-fmod_scalar" class="anchor"></a><code><span class="keyword">val</span> fmod_scalar : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fmod_scalar x a`` performs mod division between ``x`` and scalar ``a``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_fmod"><a href="#val-scalar_fmod" class="anchor"></a><code><span class="keyword">val</span> scalar_fmod : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``scalar_fmod x a`` performs mod division between scalar ``a`` and ``x``.</p></dd></dl><dl><dt class="spec value" id="val-ssqr'"><a href="#val-ssqr'" class="anchor"></a><code><span class="keyword">val</span> ssqr' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``ssqr x a`` computes the sum of squared differences of all the elements in ``x`` from constant ``a``. This function only computes the square of each element rather than the conjugate transpose as <code>sqr_nrm2</code> does.</p></dd></dl><dl><dt class="spec value" id="val-ssqr_diff'"><a href="#val-ssqr_diff'" class="anchor"></a><code><span class="keyword">val</span> ssqr_diff' : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>``ssqr_diff x y`` computes the sum of squared differences of every elements in ``x`` and its corresponding element in ``y``.</p></dd></dl><dl><dt class="spec value" id="val-cross_entropy'"><a href="#val-cross_entropy'" class="anchor"></a><code><span class="keyword">val</span> cross_entropy' : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> float</code></dt><dd><p>``cross_entropy x y`` calculates the cross entropy between ``x`` and ``y`` using base ``e``.</p></dd></dl><dl><dt class="spec value" id="val-clip_by_value"><a href="#val-clip_by_value" class="anchor"></a><code><span class="keyword">val</span> clip_by_value : <span>?&#8288;amin:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;amax:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``clip_by_value ~amin ~amax x`` clips the elements in ``x`` based on ``amin`` and ``amax``. The elements smaller than ``amin`` will be set to ``amin``, and the elements greater than ``amax`` will be set to ``amax``.</p></dd></dl><dl><dt class="spec value" id="val-clip_by_l2norm"><a href="#val-clip_by_l2norm" class="anchor"></a><code><span class="keyword">val</span> clip_by_l2norm : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``clip_by_l2norm t x`` clips the ``x`` according to the threshold set by ``t``.</p></dd></dl><dl><dt class="spec value" id="val-cov"><a href="#val-cov" class="anchor"></a><code><span class="keyword">val</span> cov : <span>?&#8288;b:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>a:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cov ~a`` calculates the covariance matrix of ``a`` wherein each row represents one observation and each column represents one random variable. ``a`` is normalised by the number of observations-1. If there is only one observation, it is normalised by ``1``.</p><p>``cov ~a ~b`` takes two matrices as inputs. The functions flatten ``a`` and ``b`` first then returns a ``2 x 2`` matrix, so two must have the same number of elements.</p></dd></dl><dl><dt class="spec value" id="val-kron"><a href="#val-kron" class="anchor"></a><code><span class="keyword">val</span> kron : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``kron a b`` calculates the Kronecker product between the matrices ``a`` and ``b``. If ``a`` is an ``m x n`` matrix and ``b`` is a ``p x q`` matrix, then ``kron(a,b)`` is an ``m*p x n*q`` matrix formed by taking all possible products between the elements of ``a`` and the matrix ``b``.</p></dd></dl><dl><dt class="spec value" id="val-fma"><a href="#val-fma" class="anchor"></a><code><span class="keyword">val</span> fma : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``fma x y z`` calculates the `fused multiply add`, i.e. ``(x * y) + z``.</p></dd></dl></section><section><header><h6 id="cast-functions"><a href="#cast-functions" class="anchor"></a>Cast functions</h6></header><dl><dt class="spec value" id="val-cast"><a href="#val-cast" class="anchor"></a><code><span class="keyword">val</span> cast : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_ndarray_generic/index.html#type-kind">Owl_dense_ndarray_generic.kind</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'c</span>, <span class="type-var">'d</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast kind x`` casts ``x`` of type ``('c, 'd) t`` to type ``('a, 'b) t`` specify by the passed in ``kind`` parameter. This function is a generalisation of the other type casting functions such as ``cast_s2d``, ``cast_c2z``, and etc.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2d"><a href="#val-cast_s2d" class="anchor"></a><code><span class="keyword">val</span> cast_s2d : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2d x`` casts ``x`` from ``float32`` to ``float64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2s"><a href="#val-cast_d2s" class="anchor"></a><code><span class="keyword">val</span> cast_d2s : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2s x`` casts ``x`` from ``float64`` to ``float32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_c2z"><a href="#val-cast_c2z" class="anchor"></a><code><span class="keyword">val</span> cast_c2z : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_c2z x`` casts ``x`` from ``complex32`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_z2c"><a href="#val-cast_z2c" class="anchor"></a><code><span class="keyword">val</span> cast_z2c : <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_z2c x`` casts ``x`` from ``complex64`` to ``complex32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2c"><a href="#val-cast_s2c" class="anchor"></a><code><span class="keyword">val</span> cast_s2c : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2c x`` casts ``x`` from ``float32`` to ``complex32``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2z"><a href="#val-cast_d2z" class="anchor"></a><code><span class="keyword">val</span> cast_d2z : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2z x`` casts ``x`` from ``float64`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_s2z"><a href="#val-cast_s2z" class="anchor"></a><code><span class="keyword">val</span> cast_s2z : <span><span>(float, Stdlib.Bigarray.float32_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex64_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_s2z x`` casts ``x`` from ``float32`` to ``complex64``.</p></dd></dl><dl><dt class="spec value" id="val-cast_d2c"><a href="#val-cast_d2c" class="anchor"></a><code><span class="keyword">val</span> cast_d2c : <span><span>(float, Stdlib.Bigarray.float64_elt)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(Stdlib.Complex.t, Stdlib.Bigarray.complex32_elt)</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>``cast_d2c x`` casts ``x`` from ``float64`` to ``complex32``.</p></dd></dl></section><section><header><h6 id="in-place-modification"><a href="#in-place-modification" class="anchor"></a>In-place modification</h6></header><dl><dt class="spec value" id="val-create_"><a href="#val-create_" class="anchor"></a><code><span class="keyword">val</span> create_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-uniform_"><a href="#val-uniform_" class="anchor"></a><code><span class="keyword">val</span> uniform_ : <span>?&#8288;a:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;b:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-bernoulli_"><a href="#val-bernoulli_" class="anchor"></a><code><span class="keyword">val</span> bernoulli_ : <span>?&#8288;p:float</span> <span>&#45;&gt;</span> <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-zeros_"><a href="#val-zeros_" class="anchor"></a><code><span class="keyword">val</span> zeros_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-ones_"><a href="#val-ones_" class="anchor"></a><code><span class="keyword">val</span> ones_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-one_hot_"><a href="#val-one_hot_" class="anchor"></a><code><span class="keyword">val</span> one_hot_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-sort_"><a href="#val-sort_" class="anchor"></a><code><span class="keyword">val</span> sort_ : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sort_ x`` performs in-place quicksort of the elelments in ``x``.</p></dd></dl><dl><dt class="spec value" id="val-copy_"><a href="#val-copy_" class="anchor"></a><code><span class="keyword">val</span> copy_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``copy_ ~out src`` copies the data from ndarray ``src`` to destination ``out``.</p></dd></dl><dl><dt class="spec value" id="val-reshape_"><a href="#val-reshape_" class="anchor"></a><code><span class="keyword">val</span> reshape_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-transpose_"><a href="#val-transpose_" class="anchor"></a><code><span class="keyword">val</span> transpose_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:<span>int array</span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``transpose_ ~out x`` is similar to ``transpose x`` but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-sum_"><a href="#val-sum_" class="anchor"></a><code><span class="keyword">val</span> sum_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-min_"><a href="#val-min_" class="anchor"></a><code><span class="keyword">val</span> min_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-max_"><a href="#val-max_" class="anchor"></a><code><span class="keyword">val</span> max_ : <span>out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>TODO</p></dd></dl><dl><dt class="spec value" id="val-add_"><a href="#val-add_" class="anchor"></a><code><span class="keyword">val</span> add_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``add_ x y`` is simiar to ``add`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-sub_"><a href="#val-sub_" class="anchor"></a><code><span class="keyword">val</span> sub_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sub_ x y`` is simiar to ``sub`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-mul_"><a href="#val-mul_" class="anchor"></a><code><span class="keyword">val</span> mul_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``mul_ x y`` is simiar to ``mul`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-div_"><a href="#val-div_" class="anchor"></a><code><span class="keyword">val</span> div_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``div_ x y`` is simiar to ``div`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-pow_"><a href="#val-pow_" class="anchor"></a><code><span class="keyword">val</span> pow_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pow_ x y`` is simiar to ``pow`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-atan2_"><a href="#val-atan2_" class="anchor"></a><code><span class="keyword">val</span> atan2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan2_ x y`` is simiar to ``atan2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-hypot_"><a href="#val-hypot_" class="anchor"></a><code><span class="keyword">val</span> hypot_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``hypot_ x y`` is simiar to ``hypot`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-fmod_"><a href="#val-fmod_" class="anchor"></a><code><span class="keyword">val</span> fmod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fmod_ x y`` is simiar to ``fmod`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-min2_"><a href="#val-min2_" class="anchor"></a><code><span class="keyword">val</span> min2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``min2_ x y`` is simiar to ``min2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-max2_"><a href="#val-max2_" class="anchor"></a><code><span class="keyword">val</span> max2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``max2_ x y`` is simiar to ``max2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-add_scalar_"><a href="#val-add_scalar_" class="anchor"></a><code><span class="keyword">val</span> add_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``add_scalar_ x y`` is simiar to ``add_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-sub_scalar_"><a href="#val-sub_scalar_" class="anchor"></a><code><span class="keyword">val</span> sub_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sub_scalar_ x y`` is simiar to ``sub_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-mul_scalar_"><a href="#val-mul_scalar_" class="anchor"></a><code><span class="keyword">val</span> mul_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``mul_scalar_ x y`` is simiar to ``mul_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-div_scalar_"><a href="#val-div_scalar_" class="anchor"></a><code><span class="keyword">val</span> div_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``div_scalar_ x y`` is simiar to ``div_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-pow_scalar_"><a href="#val-pow_scalar_" class="anchor"></a><code><span class="keyword">val</span> pow_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``pow_scalar_ x y`` is simiar to ``pow_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-atan2_scalar_"><a href="#val-atan2_scalar_" class="anchor"></a><code><span class="keyword">val</span> atan2_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan2_scalar_ x y`` is simiar to ``atan2_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-fmod_scalar_"><a href="#val-fmod_scalar_" class="anchor"></a><code><span class="keyword">val</span> fmod_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fmod_scalar_ x y`` is simiar to ``fmod_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_add_"><a href="#val-scalar_add_" class="anchor"></a><code><span class="keyword">val</span> scalar_add_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_add_ a x`` is simiar to ``scalar_add`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_sub_"><a href="#val-scalar_sub_" class="anchor"></a><code><span class="keyword">val</span> scalar_sub_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_sub_ a x`` is simiar to ``scalar_sub`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_mul_"><a href="#val-scalar_mul_" class="anchor"></a><code><span class="keyword">val</span> scalar_mul_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_mul_ a x`` is simiar to ``scalar_mul`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_div_"><a href="#val-scalar_div_" class="anchor"></a><code><span class="keyword">val</span> scalar_div_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_div_ a x`` is simiar to ``scalar_div`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_pow_"><a href="#val-scalar_pow_" class="anchor"></a><code><span class="keyword">val</span> scalar_pow_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_pow_ a x`` is simiar to ``scalar_pow`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_atan2_"><a href="#val-scalar_atan2_" class="anchor"></a><code><span class="keyword">val</span> scalar_atan2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_atan2_ a x`` is simiar to ``scalar_atan2`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-scalar_fmod_"><a href="#val-scalar_fmod_" class="anchor"></a><code><span class="keyword">val</span> scalar_fmod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``scalar_fmod_ a x`` is simiar to ``scalar_fmod`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-fma_"><a href="#val-fma_" class="anchor"></a><code><span class="keyword">val</span> fma_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fma_ ~out x y z`` is simiar to ``fma x y z`` function but the output is written to ``out``.</p></dd></dl><dl><dt class="spec value" id="val-dot_"><a href="#val-dot_" class="anchor"></a><code><span class="keyword">val</span> dot_ : <span>?&#8288;transa:bool</span> <span>&#45;&gt;</span> <span>?&#8288;transb:bool</span> <span>&#45;&gt;</span> <span>?&#8288;alpha:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>?&#8288;beta:<span class="type-var">'a</span></span> <span>&#45;&gt;</span> <span>c:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Refer to :doc:`owl_dense_matrix_generic`</p></dd></dl><dl><dt class="spec value" id="val-conj_"><a href="#val-conj_" class="anchor"></a><code><span class="keyword">val</span> conj_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``conj_ x`` is similar to ``conj`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-abs_"><a href="#val-abs_" class="anchor"></a><code><span class="keyword">val</span> abs_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``abs_ x`` is similar to ``abs`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-neg_"><a href="#val-neg_" class="anchor"></a><code><span class="keyword">val</span> neg_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``neg_ x`` is similar to ``neg`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-reci_"><a href="#val-reci_" class="anchor"></a><code><span class="keyword">val</span> reci_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``reci_ x`` is similar to ``reci`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-signum_"><a href="#val-signum_" class="anchor"></a><code><span class="keyword">val</span> signum_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``signum_ x`` is similar to ``signum`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sqr_"><a href="#val-sqr_" class="anchor"></a><code><span class="keyword">val</span> sqr_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sqr_ x`` is similar to ``sqr`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sqrt_"><a href="#val-sqrt_" class="anchor"></a><code><span class="keyword">val</span> sqrt_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sqrt_ x`` is similar to ``sqrt`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cbrt_"><a href="#val-cbrt_" class="anchor"></a><code><span class="keyword">val</span> cbrt_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cbrt_ x`` is similar to ``cbrt`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp_"><a href="#val-exp_" class="anchor"></a><code><span class="keyword">val</span> exp_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp_ x`` is similar to ``exp_`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp2_"><a href="#val-exp2_" class="anchor"></a><code><span class="keyword">val</span> exp2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp2_ x`` is similar to ``exp2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-exp10_"><a href="#val-exp10_" class="anchor"></a><code><span class="keyword">val</span> exp10_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``exp2_ x`` is similar to ``exp2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-expm1_"><a href="#val-expm1_" class="anchor"></a><code><span class="keyword">val</span> expm1_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``expm1_ x`` is similar to ``expm1`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log_"><a href="#val-log_" class="anchor"></a><code><span class="keyword">val</span> log_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log_ x`` is similar to ``log`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log2_"><a href="#val-log2_" class="anchor"></a><code><span class="keyword">val</span> log2_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log2_ x`` is similar to ``log2`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log10_"><a href="#val-log10_" class="anchor"></a><code><span class="keyword">val</span> log10_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log10_ x`` is similar to ``log10`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-log1p_"><a href="#val-log1p_" class="anchor"></a><code><span class="keyword">val</span> log1p_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``log1p_ x`` is similar to ``log1p`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sin_"><a href="#val-sin_" class="anchor"></a><code><span class="keyword">val</span> sin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sin_ x`` is similar to ``sin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cos_"><a href="#val-cos_" class="anchor"></a><code><span class="keyword">val</span> cos_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cos_ x`` is similar to ``cos`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-tan_"><a href="#val-tan_" class="anchor"></a><code><span class="keyword">val</span> tan_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``tan_ x`` is similar to ``tan`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-asin_"><a href="#val-asin_" class="anchor"></a><code><span class="keyword">val</span> asin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``asin_ x`` is similar to ``asin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-acos_"><a href="#val-acos_" class="anchor"></a><code><span class="keyword">val</span> acos_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``acos_ x`` is similar to ``acos`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-atan_"><a href="#val-atan_" class="anchor"></a><code><span class="keyword">val</span> atan_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atan_ x`` is similar to ``atan`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sinh_"><a href="#val-sinh_" class="anchor"></a><code><span class="keyword">val</span> sinh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sinh_ x`` is similar to ``sinh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cosh_"><a href="#val-cosh_" class="anchor"></a><code><span class="keyword">val</span> cosh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cosh_ x`` is similar to ``cosh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-tanh_"><a href="#val-tanh_" class="anchor"></a><code><span class="keyword">val</span> tanh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``tanh_ x`` is similar to ``tanh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-asinh_"><a href="#val-asinh_" class="anchor"></a><code><span class="keyword">val</span> asinh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``asinh_ x`` is similar to ``asinh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-acosh_"><a href="#val-acosh_" class="anchor"></a><code><span class="keyword">val</span> acosh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``acosh_ x`` is similar to ``acosh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-atanh_"><a href="#val-atanh_" class="anchor"></a><code><span class="keyword">val</span> atanh_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``atanh_ x`` is similar to ``atanh`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-floor_"><a href="#val-floor_" class="anchor"></a><code><span class="keyword">val</span> floor_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``floor_ x`` is similar to ``floor`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-ceil_"><a href="#val-ceil_" class="anchor"></a><code><span class="keyword">val</span> ceil_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``ceil_ x`` is similar to ``ceil`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-round_"><a href="#val-round_" class="anchor"></a><code><span class="keyword">val</span> round_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``round_ x`` is similar to ``round`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-trunc_"><a href="#val-trunc_" class="anchor"></a><code><span class="keyword">val</span> trunc_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``trunc_ x`` is similar to ``trunc`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-fix_"><a href="#val-fix_" class="anchor"></a><code><span class="keyword">val</span> fix_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``fix_ x`` is similar to ``fix`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-erf_"><a href="#val-erf_" class="anchor"></a><code><span class="keyword">val</span> erf_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``erf_ x`` is similar to ``erf`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-erfc_"><a href="#val-erfc_" class="anchor"></a><code><span class="keyword">val</span> erfc_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``erfc_ x`` is similar to ``erfc`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-relu_"><a href="#val-relu_" class="anchor"></a><code><span class="keyword">val</span> relu_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``relu_ x`` is similar to ``relu`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softplus_"><a href="#val-softplus_" class="anchor"></a><code><span class="keyword">val</span> softplus_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softplus_ x`` is similar to ``softplus`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softsign_"><a href="#val-softsign_" class="anchor"></a><code><span class="keyword">val</span> softsign_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softsign_ x`` is similar to ``softsign`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-sigmoid_"><a href="#val-sigmoid_" class="anchor"></a><code><span class="keyword">val</span> sigmoid_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``sigmoid_ x`` is similar to ``sigmoid`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-softmax_"><a href="#val-softmax_" class="anchor"></a><code><span class="keyword">val</span> softmax_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``softmax_ x`` is similar to ``softmax`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cumsum_"><a href="#val-cumsum_" class="anchor"></a><code><span class="keyword">val</span> cumsum_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cumsum_ x`` is similar to ``cumsum`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cumprod_"><a href="#val-cumprod_" class="anchor"></a><code><span class="keyword">val</span> cumprod_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cumprod_ x`` is similar to ``cumprod`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cummin_"><a href="#val-cummin_" class="anchor"></a><code><span class="keyword">val</span> cummin_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cummin_ x`` is similar to ``cummin`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-cummax_"><a href="#val-cummax_" class="anchor"></a><code><span class="keyword">val</span> cummax_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;axis:int</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``cummax_ x`` is similar to ``cummax`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-dropout_"><a href="#val-dropout_" class="anchor"></a><code><span class="keyword">val</span> dropout_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span>?&#8288;rate:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``dropout_ x`` is similar to ``dropout`` but output is written to ``x``</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_"><a href="#val-elt_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_equal_ x y`` is simiar to ``elt_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_"><a href="#val-elt_not_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_not_equal_ x y`` is simiar to ``elt_not_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_"><a href="#val-elt_less_" class="anchor"></a><code><span class="keyword">val</span> elt_less_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_ x y`` is simiar to ``elt_less`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_"><a href="#val-elt_greater_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_ x y`` is simiar to ``elt_greater`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_"><a href="#val-elt_less_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_equal_ x y`` is simiar to ``elt_less_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_"><a href="#val-elt_greater_equal_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_equal_ x y`` is simiar to ``elt_greater_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.</p></dd></dl><dl><dt class="spec value" id="val-elt_equal_scalar_"><a href="#val-elt_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_equal_scalar_ x a`` is simiar to ``elt_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_not_equal_scalar_"><a href="#val-elt_not_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_not_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_not_equal_scalar_ x a`` is simiar to ``elt_not_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_scalar_"><a href="#val-elt_less_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_less_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_scalar_ x a`` is simiar to ``elt_less_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_scalar_"><a href="#val-elt_greater_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_scalar_ x a`` is simiar to ``elt_greater_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_less_equal_scalar_"><a href="#val-elt_less_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_less_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_less_equal_scalar_ x a`` is simiar to ``elt_less_equal_scalar`` function but the output is written to ``x``.</p></dd></dl><dl><dt class="spec value" id="val-elt_greater_equal_scalar_"><a href="#val-elt_greater_equal_scalar_" class="anchor"></a><code><span class="keyword">val</span> elt_greater_equal_scalar_ : <span>?&#8288;out:<span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>``elt_greater_equal_scalar_ x a`` is simiar to ``elt_greater_equal_scalar`` function but the output is written to ``x``.</p></dd></dl></section></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../index.html#module-Operator">Operator</a></code></span></summary><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(+)"><a href="#val-(+)" class="anchor"></a><code><span class="keyword">val</span> (+) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(-)"><a href="#val-(-)" class="anchor"></a><code><span class="keyword">val</span> (-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(*)"><a href="#val-(*)" class="anchor"></a><code><span class="keyword">val</span> (*) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(/)"><a href="#val-(/)" class="anchor"></a><code><span class="keyword">val</span> (/) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(+$)"><a href="#val-(+$)" class="anchor"></a><code><span class="keyword">val</span> (+$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(-$)"><a href="#val-(-$)" class="anchor"></a><code><span class="keyword">val</span> (-$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(*$)"><a href="#val-(*$)" class="anchor"></a><code><span class="keyword">val</span> (*$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(/$)"><a href="#val-(/$)" class="anchor"></a><code><span class="keyword">val</span> (/$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-($+)"><a href="#val-($+)" class="anchor"></a><code><span class="keyword">val</span> ($+) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-($-)"><a href="#val-($-)" class="anchor"></a><code><span class="keyword">val</span> ($-) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-($*)"><a href="#val-($*)" class="anchor"></a><code><span class="keyword">val</span> ($*) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-($/)"><a href="#val-($/)" class="anchor"></a><code><span class="keyword">val</span> ($/) : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(=)"><a href="#val-(=)" class="anchor"></a><code><span class="keyword">val</span> (=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(!=)"><a href="#val-(!=)" class="anchor"></a><code><span class="keyword">val</span> (!=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;&gt;)"><a href="#val-(&lt;&gt;)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;)"><a href="#val-(&gt;)" class="anchor"></a><code><span class="keyword">val</span> (&gt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;)"><a href="#val-(&lt;)" class="anchor"></a><code><span class="keyword">val</span> (&lt;) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;=)"><a href="#val-(&gt;=)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;=)"><a href="#val-(&lt;=)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt></dl></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(=$)"><a href="#val-(=$)" class="anchor"></a><code><span class="keyword">val</span> (=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(!=$)"><a href="#val-(!=$)" class="anchor"></a><code><span class="keyword">val</span> (!=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;&gt;$)"><a href="#val-(&lt;&gt;$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;$)"><a href="#val-(&lt;$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;$)"><a href="#val-(&gt;$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&lt;=$)"><a href="#val-(&lt;=$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(&gt;=$)"><a href="#val-(&gt;=$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=.)"><a href="#val-(=.)" class="anchor"></a><code><span class="keyword">val</span> (=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(!=.)"><a href="#val-(!=.)" class="anchor"></a><code><span class="keyword">val</span> (!=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;&gt;.)"><a href="#val-(&lt;&gt;.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;.)"><a href="#val-(&lt;.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;.)"><a href="#val-(&gt;.)" class="anchor"></a><code><span class="keyword">val</span> (&gt;.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;=.)"><a href="#val-(&lt;=.)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;=.)"><a href="#val-(&gt;=.)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=.) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(=.$)"><a href="#val-(=.$)" class="anchor"></a><code><span class="keyword">val</span> (=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(!=.$)"><a href="#val-(!=.$)" class="anchor"></a><code><span class="keyword">val</span> (!=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;&gt;.$)"><a href="#val-(&lt;&gt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;&gt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;.$)"><a href="#val-(&lt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;.$)"><a href="#val-(&gt;.$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&lt;=.$)"><a href="#val-(&lt;=.$)" class="anchor"></a><code><span class="keyword">val</span> (&lt;=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(&gt;=.$)"><a href="#val-(&gt;=.$)" class="anchor"></a><code><span class="keyword">val</span> (&gt;=.$) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(=~)"><a href="#val-(=~)" class="anchor"></a><code><span class="keyword">val</span> (=~) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=~$)"><a href="#val-(=~$)" class="anchor"></a><code><span class="keyword">val</span> (=~$) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-(=~.)"><a href="#val-(=~.)" class="anchor"></a><code><span class="keyword">val</span> (=~.) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(=~.$)"><a href="#val-(=~.$)" class="anchor"></a><code><span class="keyword">val</span> (=~.$) : <span>?&#8288;eps:float</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(%)"><a href="#val-(%)" class="anchor"></a><code><span class="keyword">val</span> (%) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(%$)"><a href="#val-(%$)" class="anchor"></a><code><span class="keyword">val</span> (%$) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(**)"><a href="#val-(**)" class="anchor"></a><code><span class="keyword">val</span> (**) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-($**)"><a href="#val-($**)" class="anchor"></a><code><span class="keyword">val</span> ($**) : float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(**$)"><a href="#val-(**$)" class="anchor"></a><code><span class="keyword">val</span> (**$) : <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(float, <span class="type-var">'a</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(+=)"><a href="#val-(+=)" class="anchor"></a><code><span class="keyword">val</span> (+=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(-=)"><a href="#val-(-=)" class="anchor"></a><code><span class="keyword">val</span> (-=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(*=)"><a href="#val-(*=)" class="anchor"></a><code><span class="keyword">val</span> (*=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(/=)"><a href="#val-(/=)" class="anchor"></a><code><span class="keyword">val</span> (/=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(+$=)"><a href="#val-(+$=)" class="anchor"></a><code><span class="keyword">val</span> (+$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(-$=)"><a href="#val-(-$=)" class="anchor"></a><code><span class="keyword">val</span> (-$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(*$=)"><a href="#val-(*$=)" class="anchor"></a><code><span class="keyword">val</span> (*$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(/$=)"><a href="#val-(/$=)" class="anchor"></a><code><span class="keyword">val</span> (/$=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(@=)"><a href="#val-(@=)" class="anchor"></a><code><span class="keyword">val</span> (@=) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(@||)"><a href="#val-(@||)" class="anchor"></a><code><span class="keyword">val</span> (@||) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(.!{})"><a href="#val-(.!{})" class="anchor"></a><code><span class="keyword">val</span> (.!{}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(.!{}&lt;-)"><a href="#val-(.!{}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.!{}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><a href="../../../owl-base/Owl_types/index.html#type-index">Owl_types.index</a> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-(.${})"><a href="#val-(.${})" class="anchor"></a><code><span class="keyword">val</span> (.${}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(.${}&lt;-)"><a href="#val-(.${}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.${}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>int list</span> list</span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> unit</code></dt></dl></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(*@)"><a href="#val-(*@)" class="anchor"></a><code><span class="keyword">val</span> (*@) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span></code></dt><dt class="spec value" id="val-(.%{})"><a href="#val-(.%{})" class="anchor"></a><code><span class="keyword">val</span> (.%{}) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dt class="spec value" id="val-(.%{}&lt;-)"><a href="#val-(.%{}&lt;-)" class="anchor"></a><code><span class="keyword">val</span> (.%{}&lt;-) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_dense_matrix_generic/index.html#type-t">Owl_dense_matrix_generic.t</a></span> <span>&#45;&gt;</span> <span>int array</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt></dl></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-(**@)"><a href="#val-(**@)" class="anchor"></a><code><span class="keyword">val</span> (**@) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span></code></dt><dt class="spec value" id="val-(/@)"><a href="#val-(/@)" class="anchor"></a><code><span class="keyword">val</span> (/@) : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span></code></dt></dl></details></div></div></div></details></div></div></div><dl><dt class="spec value" id="val-inv"><a href="#val-inv" class="anchor"></a><code><span class="keyword">val</span> inv : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span></code></dt><dt class="spec value" id="val-mpow"><a href="#val-mpow" class="anchor"></a><code><span class="keyword">val</span> mpow : <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Owl_linalg_generic/index.html#type-t">Owl_linalg_generic.t</a></span></code></dt></dl></div></body></html>